埃德蒙顿华人社区-Edmonton China

 找回密码
 注册
查看: 2852|回复: 6

[请教] 一个计算机问题。

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上. |9 S& Z  k& n4 z/ }$ |, H1 r0 a& v
去后就不能用了,显示我的数据库连接有错误,我的语句是:
4 }2 q* |( L9 @! e: e5 [5 A" A! H7 ?! U" P2 A8 {0 X; r
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
' V. S7 y! d% ^4 f2 H1 Y' I* E0 D9 u3 @, Q5 K: j4 l
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS4 h6 ]3 f7 g$ e! ?" g6 ?- |3 s* U
数据库?
0 c1 l* p5 i3 U' n: i
3 t+ I2 @3 c2 }0 u# l0 Y& \4 m& n; F谢谢!
0 m  I# R* ^( L/ w- y, M+ {$ O" C
[ Last edited by 将腐败进行到底 on 2004-11-24 at 07:55 PM ]
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 17:31 | 显示全部楼层
connstr = "DBQ=" + server.mappath("yourdatabase") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"       & s) s& s% c. G# h" H  _$ E
        set conn=server.createobject("ADODB.CONNECTION")
" ]" j; z( z) v1 K# W% {# x  n        if err.number<>0 then
; R" C) c2 X$ Z' e5 i                err.clear  ^9 G+ }( z' F  S2 E: @
                set conn=nothing
$ L! \. Z  b- _; U) |" z: U/ m7 ?                response.write "数据库连接出错!"1 ]( V( u; J) g8 Q$ l
                Response.End. V, Z" t* G( ?9 v% E
        else
& U0 N! A% D& A2 m                conn.open connstr' ~5 c& u0 B. g( S% `
                if err then   G) P6 C8 A* x5 S0 n0 X
                        err.clear
9 N* u" |* c: J2 P- \) ^                        set conn=nothing/ T2 _6 n0 A, `: x: ?
                        response.write "数据库连接出错!"  f& Z3 n: P7 y$ M4 a) b
                        Response.End
# t4 G: ?- ~9 Z9 _% ?0 o% y                end if9 ], p7 Y$ q$ y/ \& e* b9 t3 S, M
        end if# b# c* W6 v& g' s) K) C$ k
看错了你的问题。有可能是你的server.mappath设置的问题。. X% ]" q& j% u, g9 L0 |

. a  r$ a, @% L3 r[ Last edited by Ward on 2004-11-24 at 05:33 PM ]
鲜花(9) 鸡蛋(0)
 楼主| 发表于 2004-11-24 17:45 | 显示全部楼层
您的意思是:按照你的语句重新设置一下试试?
鲜花(240) 鸡蛋(0)
发表于 2004-11-24 18:24 | 显示全部楼层
老杨团队 追求完美
不支持access
鲜花(9) 鸡蛋(0)
 楼主| 发表于 2004-11-24 18:30 | 显示全部楼层
错误信息是:
' t. @: \4 N( Q2 N! OADODB.Connection.1 error '800a0bb9'
3 a& f( Z9 M4 y& I& M2 j, z7 b( n* d/ ?; A- k% ]
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. # B$ m+ d3 j& o0 h+ e

! h4 E  |6 g' J( S2 @/ g" n我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系我们|小黑屋|手机版|Archiver|埃德蒙顿中文网

GMT-7, 2026-2-14 08:42 , Processed in 0.205090 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表