connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" 2 ~; b) [+ z; f! a set conn=server.createobject("ADODB.CONNECTION")0 L3 L$ Y+ S6 o; @
if err.number<>0 then + t1 C: y- N% X- C+ T5 _+ y err.clear4 r% K9 @# c- S+ z2 m8 Y
set conn=nothing 4 E! \" O1 y- B response.write "数据库连接出错!"5 E; j/ v$ |$ ]' L. p7 ^2 w( G* w3 V
Response.End 9 I- T" ~/ P: z( ]8 a" a5 u else 8 S) K) @. v5 t3 U conn.open connstr _; S# a T. a5 }7 I; {& z3 B
if err then $ e8 p. k& T7 _# j0 D
err.clear . _* @. P+ U- { set conn=nothing / V/ w1 n Z/ L: |" K response.write "数据库连接出错!" 9 ~9 ^; \* b& d) [ Response.End 4 a& `- H* N2 f6 T
end if$ o' Z# a' q6 U
end if % g+ f3 a3 @5 u! m+ I看错了你的问题。有可能是你的server.mappath设置的问题。1 w) B. g) y1 s6 A
6 _: M- M1 h! Z4 Z" U- t
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是:$ N2 A) | o# `% ~
ADODB.Connection.1 error '800a0bb9' 5 E$ G ^. Y8 Y1 W6 N 1 V |! t" I! z* S4 j! d4 kThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 1 {" j k2 A# Q+ u1 _- H : S! ^4 V7 c# K8 e: P# n! }我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。