埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上& m- n& ^2 M+ W1 B
去后就不能用了,显示我的数据库连接有错误,我的语句是:' m8 J1 ~( O$ ~) Q0 o0 |3 t

% c7 `, y2 ]* s1 X8 w   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )" l# R# `8 \* E

2 D9 w- P. e8 B' \这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
- ^3 B) ?2 j7 n% x数据库?3 v# t  j, U8 H# a

* ^  u8 H( J! K7 v: G谢谢!- y- x' m  n& B& y' C
# ~- d$ e$ o) \  ^
[ 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)};"       3 ^8 G$ |, }( P- _
        set conn=server.createobject("ADODB.CONNECTION")0 J; C+ o5 r" c0 p  A/ f  U
        if err.number<>0 then 2 h8 q4 x! A- V3 O) L
                err.clear6 Z8 E# P  S' g8 _! r2 F8 M
                set conn=nothing3 g# R* X- j( s1 P* v
                response.write "数据库连接出错!"
* W$ z; S- {6 D; p! J/ z- i                Response.End  Z; _7 S! R' i5 @
        else: `, O# f% s6 |
                conn.open connstr
* L# y6 ~4 H1 l( j3 b+ ?6 t, P' |, e                if err then
8 G( N$ ~+ p* H" m* A                        err.clear
! s9 _  y. m. `                        set conn=nothing
* U/ Y7 b( u0 Z$ K                        response.write "数据库连接出错!"
$ s! j: M3 B$ V5 f- ]1 P% ]                        Response.End
8 R5 m7 b, t9 i/ R+ f: s                end if
+ h0 [. r( N  N( s. |- P. s        end if
' h0 [8 N) u' N3 D% }1 z看错了你的问题。有可能是你的server.mappath设置的问题。' a8 |( N# R' O# ^9 B' j9 Z
& j5 e) i/ q! ]4 c' X9 v
[ 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 | 显示全部楼层
错误信息是:4 T/ S1 o. W8 D/ Z2 ]' ~, U
ADODB.Connection.1 error '800a0bb9' - f! |  e5 q, \6 j9 j" @5 T
! }1 j7 T1 {8 C7 A: D
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
8 b3 |1 K$ C2 Z; ?" G
1 |) A" q: a, X$ d我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-5-16 11:17 , Processed in 0.082620 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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