connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" / p' v$ I8 U2 m0 O7 X
set conn=server.createobject("ADODB.CONNECTION") : |7 o( w! A" j& r. f @ if err.number<>0 then ) l- ]* u: ~: p( H err.clear ' X: ^9 S% p& m# g set conn=nothing* }3 r+ x' R2 b; a
response.write "数据库连接出错!" 1 ^5 ^6 S! F5 C5 p' ]) ` Response.End 3 n4 R8 I. q: K" K' { else- {- g& G8 b- K9 |3 S, N9 B) o8 k
conn.open connstr2 S' a! ~# b0 s; G* J( {1 J
if err then ' b" n, @6 G' ~6 I# k err.clear( m; L$ B' D' |$ I
set conn=nothing& y9 B& P8 @2 e7 g
response.write "数据库连接出错!" - [+ B. {3 `2 v Response.End ; d W- f% F+ x3 f end if g/ Q* }8 C2 E! t, [* p3 _
end if 6 c( r/ e; I+ c1 m看错了你的问题。有可能是你的server.mappath设置的问题。( k7 x9 y. J( t5 j: _
0 ]8 |' o& I1 s" V# {) m
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
% R8 M5 J0 ~7 r+ J2 _. L7 SThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 0 ]2 B, B- Y" G/ p& S
3 h) L" B: d/ D9 x+ i% _
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。