connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" & ~2 a! s5 p0 _6 t
set conn=server.createobject("ADODB.CONNECTION")6 z" u3 C8 @. b F; Y; h$ P
if err.number<>0 then # t) x; V* E! ]' g err.clear 5 I4 V& G. `; E' }2 ^, t) V. U set conn=nothing ?' P7 S# A" W
response.write "数据库连接出错!" 9 q& p3 w& H0 {! r/ } Response.End+ r4 ?- q% p% G+ a+ H4 g& J
else' k! E4 t1 g3 i% B) t
conn.open connstr + i1 Y( p' J, f if err then $ u9 C% A! o ?) X- ]
err.clear3 V3 u4 t/ q0 N* E% N
set conn=nothing7 q- f X3 B" P( r3 o- i8 C! J. k2 m" X
response.write "数据库连接出错!" 9 l" e( r2 m9 t' f" b: X$ F Response.End - f2 d- O, t+ ]+ G) u: B+ n) m
end if$ h; J! |5 t/ o; }
end if 8 O" n+ S6 v( f0 N4 n看错了你的问题。有可能是你的server.mappath设置的问题。* z/ Y& T/ V+ L. Q* E7 S
: K5 w L! o# Q/ o
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: : Q+ N, V- [- U; u3 LADODB.Connection.1 error '800a0bb9' . W6 d0 B# h+ X/ i. Y. T9 v
5 _9 x8 n- S$ K$ bThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 1 n3 N: L7 F+ H
$ O9 c: `* R# U. R3 y我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。