connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" % _1 `% V. r5 l6 B1 \
set conn=server.createobject("ADODB.CONNECTION")) W* }: O8 F: t+ a7 U( Q
if err.number<>0 then 0 r" _) S1 X6 d3 K4 X3 t
err.clear + S2 g! g" c. v* H, m2 Y1 { set conn=nothing / E4 L' X8 ~/ J) R2 [. B- C response.write "数据库连接出错!"7 K* o I# ?0 H4 K
Response.End; a" y2 j9 j4 C1 r
else9 H- t; P6 E/ u1 Q. q4 y! h
conn.open connstr7 `, L( F# H- i3 t3 X4 Q5 c
if err then 6 g4 _! u6 |; C. L err.clear* X& d" ~ c2 l/ U
set conn=nothing 3 R) R( ]1 R. S: Z5 g response.write "数据库连接出错!"0 {$ c- t4 X8 M$ T# Q, s& P
Response.End 3 a1 l6 S9 Z" k' M& h; _, e end if y; B. a. b! n1 ^2 O$ M end if6 G) P+ _* n9 c4 J) p
看错了你的问题。有可能是你的server.mappath设置的问题。 + a( U0 I' O$ B! A/ ]+ J" n) d" N( t9 S4 x
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是:$ r( ?) x( S/ y5 H& A: |1 ^
ADODB.Connection.1 error '800a0bb9' : d- e; S8 H0 c1 \
9 I, a+ B& Y& [( _1 S; {+ B) o2 }
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 6 O1 V0 D9 ^8 N! f9 P! _ " o! T: [' Y2 n5 i3 r+ Q' _/ N我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。