connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" + ]( J& V2 s. M! _. t. U5 h
set conn=server.createobject("ADODB.CONNECTION"); }; c2 a' ~( ~* ~
if err.number<>0 then 6 a2 Y! c, R) J
err.clear ! W; w4 u- b @5 k) o9 Y. ^ set conn=nothing 9 x0 Y$ }6 @3 I response.write "数据库连接出错!", c# j* k, K' O
Response.End 3 l) D k9 Y; E7 L8 V else ! M/ A) D9 V: t: M% n. U conn.open connstr# j1 g* d1 l8 g% o) T! u2 C
if err then 8 _5 s* [( ~" B err.clear / o I- i/ r5 c& i1 D$ Q set conn=nothing 6 c/ ?5 t6 M6 t5 c' O! ~( Q( R( S response.write "数据库连接出错!"( y; g9 }8 Y6 ~, H
Response.End 6 ^; u% ?! W+ ]8 h end if + }. R) V6 j. h6 Q4 {* ` end if+ I: l$ S3 n( F9 o) J
看错了你的问题。有可能是你的server.mappath设置的问题。 % W" e5 T' T! O( r: p9 a* p' B3 C) S
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: 5 o$ q- w" }$ A" [ADODB.Connection.1 error '800a0bb9' ; H5 f e( s8 n % O* a$ x# n5 C3 n3 n) g6 u" NThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. - J" B8 @9 s; V: |# `/ a
3 P: X# p; F# a/ S _, J我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。