埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上' A1 V! w) Q# `$ ~: b& f
去后就不能用了,显示我的数据库连接有错误,我的语句是:1 \* m+ J9 x1 H) ?8 ?

0 V/ f: I: \/ s) q- h9 c& P   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )2 b! m7 v  e& Z) V. f

  h9 X! e7 h& {( i, `2 E这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS$ e* N/ r, L/ U8 @* {- j
数据库?
7 x" T2 k% k, U; p0 y/ g% t: i7 R* H: H. @
谢谢!
3 i( z, s+ T! @1 ]7 ^: G- U; f0 b0 w( a2 `% y  K# v
[ 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)};"      
9 k2 g8 f3 {  {+ u1 n/ J1 z        set conn=server.createobject("ADODB.CONNECTION")
) c- O1 U5 @# w9 i+ J3 |        if err.number<>0 then 8 u5 j+ _# o) D
                err.clear
& s- D  l9 k. Y                set conn=nothing
  N" c: u/ i" }4 l, C                response.write "数据库连接出错!"8 Y) E. V3 @3 @) a
                Response.End  v* f4 c# o! \1 Z. l
        else8 n% V( G6 m  N
                conn.open connstr
9 V# x  a  z& d3 \3 t4 ~                if err then " z' m. _1 O# m$ ^) q
                        err.clear1 e, M/ e+ W3 e7 B7 I
                        set conn=nothing
) h$ n9 q! Z8 P* L                        response.write "数据库连接出错!"
- t* D- ^) b# B6 p* b4 p8 B2 {                        Response.End
2 c+ `' A2 [7 s  r1 ]* T                end if( `% {7 ]# x" f0 {, A0 I
        end if5 _6 W2 f) D% M7 B/ F
看错了你的问题。有可能是你的server.mappath设置的问题。4 O7 R( a; T; P' I4 J" \
* D9 Q$ @# B( }
[ 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 | 显示全部楼层
错误信息是:: I$ L* S1 e3 P3 a
ADODB.Connection.1 error '800a0bb9' 8 N9 N6 e6 [6 n- s% W+ F+ g
: a7 Y( b0 A7 H5 Y% B8 a3 \
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
6 j- z; S, f  B7 D# A+ C% \' l5 ^- ~: r5 M) p' J& U
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2024-6-11 10:00 , Processed in 0.220943 second(s), 15 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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