埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
- s* O$ J6 \+ }去后就不能用了,显示我的数据库连接有错误,我的语句是:9 J* h, c9 l+ L! S8 ]% }
5 e, o: o6 w3 ^, N% r! x
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
, e6 c  n% t3 m$ j& q. E+ b
2 r) M+ }+ Z4 h这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
& t+ ]2 g2 P, @* I- o/ _. Q( T" W0 e数据库?
& L8 ?+ i+ P- T+ Z, E. P
+ B% |9 V: e' W" f谢谢!
! r. T. x  l1 S
5 _# p, S) M5 b' l% v& a[ 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)};"       8 I" T) E. |1 s8 |
        set conn=server.createobject("ADODB.CONNECTION")
; [3 e2 S2 {6 A. ~* [6 a1 `. ~        if err.number<>0 then
7 T& Z* B9 P; {7 h, b                err.clear
/ s0 K( e$ y3 z! P9 a0 t. o                set conn=nothing+ L* c6 D" ]% [  y8 |) k; W8 d
                response.write "数据库连接出错!"# |+ r4 f2 t# R: h/ z; ]
                Response.End6 Z- ]* |3 E% T4 k  b
        else
* E1 D0 t5 S. `* ]& F                conn.open connstr7 d7 O# j# A% Z2 n
                if err then ' |* d& K) r8 S" a# Q
                        err.clear0 V! K: H2 q5 q# H' E2 T
                        set conn=nothing% I4 K* h0 ^$ V2 }$ T) W
                        response.write "数据库连接出错!"
9 W+ |$ e9 v" X( `9 }                        Response.End
, b# I$ ^2 H% d3 n                end if
& g0 |, C5 E, b! f: V* B        end if
( D6 t. X; o: j, V$ W7 k看错了你的问题。有可能是你的server.mappath设置的问题。
% I1 e8 J  e( Q( j7 C
! {8 ^1 {) z$ I+ Z% ~- Q% {[ 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 | 显示全部楼层
错误信息是:8 {6 z" b! H+ ?/ D3 G5 a& p
ADODB.Connection.1 error '800a0bb9' ) v  ^9 B* a2 w  }, F3 x) A. L

4 J7 }5 e# V- |" H# iThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
6 I8 [  o& ]( r! _! D4 M" [" s; U& U0 `( C1 t2 a+ H
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-8-20 07:25 , Processed in 0.300505 second(s), 16 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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