connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" ' h: b. B. g& X9 e1 y' J5 w" X0 F
set conn=server.createobject("ADODB.CONNECTION")6 T$ Z* q. D6 R& _! H+ x
if err.number<>0 then 4 ?6 A6 v w0 e4 I err.clear8 {3 H5 d0 v$ ^- r& w( ~( E+ z
set conn=nothing . f- X: k: e7 z response.write "数据库连接出错!" 2 g. Z* e' [, U. u `! Z Response.End9 A) N2 K' L* x( w% g
else 5 [) X( k" d+ Z. \( _6 N. B conn.open connstr" k9 O5 |8 }. {6 e$ h0 @
if err then ( L7 o* H$ v5 h6 {
err.clear+ {4 w+ f K' O% H! s
set conn=nothing 0 v# ^! s V7 E }" F response.write "数据库连接出错!" - N' u9 i$ e! }/ C" D. v6 J Response.End , p6 ?2 B3 E1 n& ]7 O G end if 9 z3 V* W% i ^ end if' t& h$ m' m$ |0 M. p7 e; F
看错了你的问题。有可能是你的server.mappath设置的问题。5 W! M: z/ V1 |! Y0 I7 h
0 ~2 W' Z) g! P- d
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: 7 Q( @8 c: B1 e% ?' @ADODB.Connection.1 error '800a0bb9' " d, R7 o' Y1 i4 r" ]3 e
+ T3 L) r7 d3 }9 C f5 J
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. $ j1 R+ l5 l+ [5 N0 U6 h' @