connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" & t/ b5 S3 T g: M8 X
set conn=server.createobject("ADODB.CONNECTION") 9 C; T& u u/ |) `5 y if err.number<>0 then 3 B' p& C8 [8 ^( v
err.clear2 Y! W1 h4 t; k0 _5 l8 h o
set conn=nothing 7 d7 |/ s- p6 @" L2 l. ~$ O' f" K response.write "数据库连接出错!"% @+ j* p6 h# C5 ?
Response.End : ?; o; i _& s1 b! ~0 @ else$ z* H$ q2 R( q5 b% ~: q0 W6 O
conn.open connstr + C$ C" }7 }6 U8 B2 V, A if err then 9 e8 w5 G* u7 s
err.clear1 \ r0 t% P/ L1 n
set conn=nothing 7 m* Q6 g9 g2 c5 r response.write "数据库连接出错!"( U& v& N; D8 r' d( j1 x) f! M
Response.End / h1 Z3 v ~; O N end if& W$ U0 B' d1 e: Q0 B4 M W& y% N
end if 2 g9 a' K. C9 I' u. O" U$ [. p# ]2 V( \看错了你的问题。有可能是你的server.mappath设置的问题。6 L' a3 ~ G J0 f; f( h/ |8 o
' i, ]' K- q7 _' G& f+ J
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: 8 }3 y m7 B) o) V3 b; uADODB.Connection.1 error '800a0bb9' . F# U9 o4 C* D6 F7 A& q; h* g7 b
3 f* A" F! ]9 v5 r9 X" e r: C& UThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. + S4 A" ~( K! q$ e
8 O* W- a4 w( O: P$ w/ [& {! {
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。