connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" 9 j1 i( g" U1 i$ O6 `; T set conn=server.createobject("ADODB.CONNECTION")8 E3 n2 n4 N3 l" q( O
if err.number<>0 then 1 h P( T4 L4 _: a: O; r
err.clear 3 g* ~) T m7 R3 B% \" v" C2 P( G set conn=nothing* `& c+ R" c; K- R" A8 e9 g
response.write "数据库连接出错!"5 i$ e* W& `8 ?
Response.End: G- [& u% ]; T( {0 e' o
else7 L- A0 G) X T J
conn.open connstr& N8 o% G3 x( k1 E* V6 M) k9 m9 P
if err then # Z3 t1 ]# C, D
err.clear " K( M) X; d2 Q6 q set conn=nothing 8 Y6 N7 L+ l- _* x3 R$ ~) d4 a response.write "数据库连接出错!"' E! p5 H) e. u/ ~$ P( E4 z
Response.End " M/ L1 P* w9 @5 M M; B" K end if 9 F$ f7 I" Z6 R' U/ I: E# \ end if : Y; _0 c1 j7 w9 O$ j4 o8 N4 J& ]看错了你的问题。有可能是你的server.mappath设置的问题。+ }% @5 I, Z. A
, S- e( g$ y& F
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是:" [0 E' U! d! B" x/ x0 U3 x
ADODB.Connection.1 error '800a0bb9' 4 w+ `1 S4 m1 |1 z! z# y a+ Q* l$ T
! }5 f) X' q0 q" Q9 _ T7 @ G/ YThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 3 E& g1 H. G: x$ \6 A3 y! ^/ g+ {3 T* s! H9 m
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。