埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
& W, o2 O  T8 V, g3 m. M6 x去后就不能用了,显示我的数据库连接有错误,我的语句是:
. X7 M' N) c: e2 J  L; s. R; r
5 {, m! \3 O- m8 D/ {# H   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )) w7 h" c' @* L$ V6 k
+ Q! w( y6 t9 q, d
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
$ v& y* y6 v! ^数据库?
8 P5 W  j4 A( L# _3 x2 z
3 X# ~  \- I) N1 l0 f) P6 P, F  T谢谢!
2 a( y8 I& a" W) x; G
6 }( w8 K- ^* b% A) ^8 [" f[ 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)};"       $ Y  v5 r: W5 }  n
        set conn=server.createobject("ADODB.CONNECTION")
, y4 a! t! K: h3 V- s        if err.number<>0 then
6 s. o" F8 n# |8 m2 h                err.clear
+ k* y9 T( O! t7 Z$ e( B2 q                set conn=nothing
3 N3 N: t  G9 S                response.write "数据库连接出错!"
7 U9 Z8 s: i' `2 w/ r                Response.End, o6 C0 H3 q  s: _* R. U: U
        else
4 F( n0 s+ _5 X- w& a$ N                conn.open connstr
+ a6 {( E2 m% f( F9 G8 d                if err then & S" l9 ^# L7 H. T4 \0 u
                        err.clear( [' h, [( q+ _& t
                        set conn=nothing! `, W3 z: l/ K3 x
                        response.write "数据库连接出错!"
0 D- e' G3 x1 l                        Response.End : f- q. n$ @8 S4 i) u
                end if' {2 W7 ?& {3 O& p0 c8 J9 ~
        end if
) J: p5 ?2 H, t看错了你的问题。有可能是你的server.mappath设置的问题。; o8 c# i: }. U4 T% f# Y

! l/ |# O$ N! J. R% o( h[ 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 | 显示全部楼层
错误信息是:
9 \4 T2 u  T" ^2 A; Z8 l. O4 oADODB.Connection.1 error '800a0bb9' ; F1 G+ N( G3 ]: L3 R3 Z) k; l

/ c* e# x' e+ @The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. - e8 S5 t. g7 ^) c& Y1 W9 B3 i

/ D& K3 M/ e& g6 e, m" Q我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-9-8 22:10 , Processed in 0.670195 second(s), 16 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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