connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" . q" n% k$ ]1 z+ r set conn=server.createobject("ADODB.CONNECTION")+ `/ q8 w7 ?& o' D
if err.number<>0 then 7 M: u7 X# [' l# Z
err.clear 3 ? \3 q1 n& G0 _. P set conn=nothing 6 j) r6 P; M9 |6 M response.write "数据库连接出错!"7 R; r/ U% k' c2 L% M
Response.End ' {+ x s% @3 X) _ else; z# f0 `/ n0 q& C
conn.open connstr R7 Z6 ?$ ?7 } if err then 9 K+ I3 S6 x6 A4 t err.clear( N+ e. W4 N; D" y
set conn=nothing 5 S& a/ F) F: a+ b response.write "数据库连接出错!"; W& W( r. U( ]; f( @/ H5 X
Response.End & o- R9 k) X9 L+ @& z8 d end if " U8 |; r1 [4 a j( T) ^( E end if & C7 ^) I% s% t看错了你的问题。有可能是你的server.mappath设置的问题。 / r6 n! G$ A G- e- T/ M5 K* l" w5 q9 X" o0 e, Z3 A
[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
错误信息是: # z7 t |# L) qADODB.Connection.1 error '800a0bb9' 4 g. [5 t% t& U* f; a6 q" O# }8 B( _# O* y* A3 {0 W
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. " @+ Z0 E9 X8 \# g0 [# Z
6 e* u1 E. X1 R1 k" S2 f7 c/ k' s/ l7 m
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。