connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" 2 c+ p7 v) e* W o# s) T set conn=server.createobject("ADODB.CONNECTION") / Z/ p0 ^& P0 M3 h if err.number<>0 then " y$ e2 G# [: `0 p) w err.clear( l0 \1 U* V" f
set conn=nothing 0 k! @" g" T: ?9 V response.write "数据库连接出错!"5 ~6 w. A7 A4 z
Response.End: J' Q. b; S% D' ]! a) ~* |* w/ [1 _
else' w a6 D% R1 D' X$ N" r2 I! D
conn.open connstr3 x6 `; U; u$ z+ N2 p
if err then 5 n B. v0 w: d. L& |( @
err.clear 6 |+ V7 t/ }& m* s. X4 e/ K set conn=nothing: j+ I3 o' |1 g1 }7 c
response.write "数据库连接出错!" ( c( Y6 g% T& R2 Q5 z( O Y Response.End 7 y1 V: n8 X+ I
end if7 A! y( V$ m, {9 ^# c- l& r3 J% r% x
end if 3 y* q# @6 R. h4 i/ C/ E- ^看错了你的问题。有可能是你的server.mappath设置的问题。* V5 n- P- {( F( w
/ w, f# Q3 t! D0 ^0 {, d[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: : `8 O3 N+ J* x' Z' ^) JADODB.Connection.1 error '800a0bb9' ) G: E' h; y% t. l: k" x; ~- T ] ( p6 i2 M7 {4 x, t: e2 {The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. # \' C6 X# \; X* [8 Q. G! B! h% W 5 k# Y# Y8 b5 }8 B$ J我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。