connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" % V Z/ K7 I- e) K* b" G set conn=server.createobject("ADODB.CONNECTION")9 a6 a; v1 g! ^6 h. B
if err.number<>0 then 7 n3 a% B9 Q# n7 i6 q
err.clear) V1 q" |2 o6 L7 [; Q' B5 M
set conn=nothing 6 \! C7 ` w( l! a response.write "数据库连接出错!"* T) y& n/ K; M; V
Response.End 0 }. c5 P! K9 H, F G- I else # l: f; g! y! A9 E conn.open connstr/ f$ u5 I0 A; Y
if err then 9 ^1 l$ o9 P* M3 |
err.clear' G; R7 b$ t3 C/ `" d
set conn=nothing1 z& E# n9 y: _& i" ?* y4 l9 S
response.write "数据库连接出错!"9 t7 G L) V* k% |8 @" A
Response.End . y2 G/ k: H+ u. o! Q3 v7 r
end if& m& w/ `) w; s+ `
end if 1 H: Z. T7 b) }8 E看错了你的问题。有可能是你的server.mappath设置的问题。 / H, U4 A8 G: c ( u7 F a( `" k# r( a[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: - d$ ^7 ?; M% j. E5 oADODB.Connection.1 error '800a0bb9' 2 O3 B5 J+ b3 _- n / j1 c/ i$ Y. Y: n D' OThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. : i; d3 e0 L f
* Z) E. A r6 a" S9 z
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。