connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" * Q' I" ^# b D6 S1 J( p
set conn=server.createobject("ADODB.CONNECTION")+ m( S. Q. m+ a) S% _$ M
if err.number<>0 then 9 T) a# b# H" ]8 `' v
err.clear % @8 k6 n9 Q" O2 N- @. p- r$ [ g set conn=nothing% Y$ l6 N( W3 D1 ~$ R
response.write "数据库连接出错!" " i$ v# B5 e& A' f* O Response.End - T7 }% _( h$ r3 H0 Z& X$ k else$ w' b) q: X2 Y9 f2 A
conn.open connstr I/ | k4 t0 \+ M
if err then & J" l" l( a8 M) q
err.clear1 z- q3 }5 B1 a3 T3 B* G
set conn=nothing/ _; A( o% e) K0 ?' E) N4 q( ]6 U
response.write "数据库连接出错!", Z# I/ U# X. L0 P
Response.End ) g% Y6 b# A4 Y6 W end if! a! b# Q8 r. i U5 L, s* O
end if/ S q! g' @3 K$ X: h" g
看错了你的问题。有可能是你的server.mappath设置的问题。6 R8 c7 o& P, X! H
* m3 ]/ d' M7 n1 @5 @[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: , E6 F0 [% d/ ?: V" ?) BADODB.Connection.1 error '800a0bb9' 4 F* v. W: H K. K( Q' k4 i* y; j5 C4 q' U# P, D& E
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. / {) o& t( c5 K
; a5 J4 P/ N; B; w! L0 `& K9 K7 k* _
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。