connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" . `3 S% y. m. s5 Z+ v$ K set conn=server.createobject("ADODB.CONNECTION") # ]! S4 m M. q! c/ T4 u if err.number<>0 then # ^$ A1 `* C$ m) F: Q4 H err.clear A# x& o6 K. o set conn=nothing' z. P" s. t2 I. Q+ Z
response.write "数据库连接出错!"+ m' s1 M+ }9 J2 u
Response.End 1 ~8 Z) @9 N9 j8 S+ Q# S! T else * v- ^0 t& N" f7 P7 [- t conn.open connstr / t0 `+ t* @/ @ q- A if err then ; K K) O/ P5 a+ D err.clear . B8 A) C! Q. x( I( `. v set conn=nothing+ A5 D) ^ t' s/ z$ A, f" U& t
response.write "数据库连接出错!"& W% Y/ O+ A, }2 v8 f" z
Response.End ! S: q) |. N* h; p end if: P' m6 R6 m$ j0 O' ?: g
end if$ C5 q2 a' A) h/ r* l" U
看错了你的问题。有可能是你的server.mappath设置的问题。 9 n& t- D# }: ?% b& E+ _ * J! f0 M* P6 C8 }4 m! }/ e[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: 8 ]" G$ `) E+ m2 A$ T, WADODB.Connection.1 error '800a0bb9' 7 y a7 [# x$ h6 d' m 9 r+ _! H! F% q! T( V, C pThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. ' K/ o( Y, V* |/ ]7 {' ~" E$ Q G% C0 N8 \& R* }' H2 u/ H3 y6 j1 p
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。