埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上% p1 [" y+ y$ e5 @
去后就不能用了,显示我的数据库连接有错误,我的语句是:) v3 u2 J( l% Q/ D: J$ r! S

& g: q1 ~/ V# j1 B9 P7 q& h6 x   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
6 t7 T& d) }+ l$ R& c
: z0 o1 w! q( Y这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
  {% F3 a2 C# a( e) }) j6 A5 ~数据库?7 E6 K0 Z- X. C4 o- p/ G# ?

; x1 U1 k! A. Y( S- u7 u谢谢!# g0 Q5 c  f% i
! M0 U# z( N0 k
[ 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)};"       ! X. r) X" @, x7 [  ?
        set conn=server.createobject("ADODB.CONNECTION")& N4 _2 {0 t6 C; i
        if err.number<>0 then 3 N: |9 Y4 e0 a1 A" x& L4 Z+ b. N; J
                err.clear
& j- _( K. s1 V- G" a                set conn=nothing
/ Q3 F2 R) b8 M* L                response.write "数据库连接出错!"
( q" P6 f# b4 Z9 L. Z" [                Response.End
7 @- G( i# n. n0 ^+ H  R        else1 j; b; U1 x0 O, e  p- y$ x
                conn.open connstr- i, q( g$ u: v2 j( R8 Q' l
                if err then ; ^' {) f8 E8 u, z/ G% f
                        err.clear
5 Y0 p2 _; M3 o. y$ ]                        set conn=nothing, e$ A, m  w6 X4 J
                        response.write "数据库连接出错!", ^- D4 _8 C  T% ?' H, B5 m& E! V) l  S
                        Response.End   n7 y- P# o$ `: G; R0 ?5 j
                end if
& k* z3 e. ?( l9 `        end if& m5 \$ Q9 B$ a9 s: c
看错了你的问题。有可能是你的server.mappath设置的问题。8 r( M9 Z6 z5 `9 c
0 G3 ^% ~8 V( U$ p
[ 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 | 显示全部楼层
错误信息是:" `  w  p" D8 t' \: q! a# c
ADODB.Connection.1 error '800a0bb9'   R0 U: K0 f: y1 e
# }+ k% x; D1 X- G9 Y: z/ h
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
3 v0 s# \! c3 J& j6 D  W, p
) b' m5 p, _- D我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2025-7-19 09:25 , Processed in 0.127056 second(s), 16 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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