connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" 8 U. e/ n1 f: v6 d3 [$ @
set conn=server.createobject("ADODB.CONNECTION")* ?# O! ^6 A; z% g
if err.number<>0 then " [7 b1 @) i0 O err.clear: \: x! ~! U3 n
set conn=nothing , `0 J9 W3 F$ v; O& N H- N: F response.write "数据库连接出错!"( {$ N0 b! C/ a
Response.End " g2 k. u {+ O8 o k% Y$ O else - J, L2 u: B( J1 s0 ] s% k conn.open connstr 0 g0 H" p5 p( }2 w: Q1 Q$ T if err then 7 _7 C" ~' I" g" G3 j# c err.clear ; g6 F& H2 ]/ r- m0 R- l set conn=nothing- v; H$ c# ] `3 N. q/ u
response.write "数据库连接出错!" % l- H% p- c' f9 @ Response.End ( r$ u5 m* C- u1 I
end if; z1 O' c& y2 S4 M: n( M
end if6 V2 {( I- z: y" Z
看错了你的问题。有可能是你的server.mappath设置的问题。' E/ n5 a/ w) m1 V8 ]
, O' `- Q) c) N4 U! H! r. M7 V( a
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: ( y$ N& d; x1 z1 r: J! {0 S/ p7 Z5 yADODB.Connection.1 error '800a0bb9' * B( N: g% ]. @1 h' h c$ @* |# P8 z& m
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 4 i. w% U/ a7 ~4 w6 ?1 Z