connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" * G( i; K# P+ ], T3 Y3 S set conn=server.createobject("ADODB.CONNECTION")# B) r+ v2 Z2 E% K# y
if err.number<>0 then % w7 ?' p5 F+ \4 @) `5 T" g0 r( A+ I
err.clear$ p/ I. q8 [. E7 S. A) A2 Q1 @
set conn=nothing - e( s6 x1 n6 K# D% ]) X response.write "数据库连接出错!"& o Z8 J* K& M5 J9 o
Response.End7 g3 K V) n- o, n
else , e+ ]7 z1 |; l _/ M; g; l ]+ j! Z conn.open connstr- m- i1 J0 \: K
if err then : P1 I2 q7 b" _ err.clear . @% h; A$ b' {/ C5 S! l9 x/ k set conn=nothing + H, d* {" l/ T6 y7 X: t! I7 x response.write "数据库连接出错!" 9 n2 U1 w0 w) N8 S$ H3 o Response.End + I& v" J# l2 c* J+ P
end if a1 Q( P6 M: o9 `: `
end if; g! z$ j& X0 U+ w; z
看错了你的问题。有可能是你的server.mappath设置的问题。" b" I5 D- y! H' o' f2 d
5 M. V9 U. X2 c3 V8 }[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: ' b- @" U) V G J FADODB.Connection.1 error '800a0bb9' 5 f7 }3 j8 j4 Z7 z- d1 k; a
f* q* G0 s" e! Y3 vThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. : J& S; m& n* l8 Q: a
( n9 R. F+ ~7 J; O, y# o- k9 Z$ e1 @我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。