埃德蒙顿华人社区-Edmonton China

 找回密码
 注册
查看: 2838|回复: 6

[请教] 一个计算机问题。

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
/ Z4 c+ `& v& r& _, e9 t去后就不能用了,显示我的数据库连接有错误,我的语句是:* b, X0 l$ v+ h* Z, t/ y
  k: h( u3 x  i# k5 H' R" U
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
9 N$ _* w- M# U, J$ @- |# E, ^% u, s9 I: j
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS5 s3 C# ]% d: x; }4 q
数据库?
, E0 J0 x/ U, R" C! G% h/ e- j' v' C5 d9 {  [
谢谢!
+ I& |# t$ t3 B5 l* B3 b  |0 @# y( s, i3 Z, p# z0 i9 E* \) w
[ Last edited by 将腐败进行到底 on 2004-11-24 at 07:55 PM ]
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 17:31 | 显示全部楼层
connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"       2 P5 v' _$ M1 s
        set conn=server.createobject("ADODB.CONNECTION")
9 O7 X- w( u* l9 j! J$ l        if err.number<>0 then - T, [% N' X! \+ T5 T$ h+ u
                err.clear; Q$ u" b" c! I
                set conn=nothing6 [7 B, \( W& R) d, g: a7 j
                response.write "数据库连接出错!"
: I, G  ~/ R3 h                Response.End+ e$ F* ?" H9 y  R
        else
4 ^8 Y3 T  z9 A' }                conn.open connstr
- f" O2 s* u* p6 t                if err then 1 ^! X+ p  \, |5 @
                        err.clear
3 K$ m& j7 H5 s3 Q0 W                        set conn=nothing
4 G% s  M+ _0 T$ r8 ?% B                        response.write "数据库连接出错!"
# b) j  |4 r0 d* o2 B2 x. i                        Response.End $ k& f! X" |: n/ k
                end if
5 R/ ]3 @8 f2 c  I# O  i# A8 g        end if
/ p  f8 `/ s4 I8 y6 u看错了你的问题。有可能是你的server.mappath设置的问题。2 ^* ?- I7 A$ n

0 Y0 _/ L) |# l% U& T5 s[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
鲜花(9) 鸡蛋(0)
 楼主| 发表于 2004-11-24 17:45 | 显示全部楼层
您的意思是:按照你的语句重新设置一下试试?
鲜花(240) 鸡蛋(0)
发表于 2004-11-24 18:24 | 显示全部楼层
老杨团队 追求完美
不支持access
鲜花(9) 鸡蛋(0)
 楼主| 发表于 2004-11-24 18:30 | 显示全部楼层
错误信息是:4 C6 F' p/ [/ D; _' Y, H6 ?) C
ADODB.Connection.1 error '800a0bb9' ( R) Q% G# B6 a& e4 T

7 Z% G3 F& d3 ?. u& nThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 0 W' Q0 n- Y9 c+ W: g
1 m" x* c) N2 y1 W; p6 b
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
理袁律师事务所
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
大型搬家
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系我们|小黑屋|手机版|Archiver|埃德蒙顿中文网

GMT-7, 2026-2-9 21:48 , Processed in 0.126001 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表