埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
- m& a" h3 \6 c去后就不能用了,显示我的数据库连接有错误,我的语句是:
2 C& |. W! \# X5 ]9 X+ A1 H- T9 x
. L* s1 ^8 Y3 I. g! i! [   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" ), ^# L5 D" v7 {% `

; G" I5 L1 a1 s3 n, C  K4 H这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS6 W# P7 h" o( u( A) S# F8 o
数据库?  f% }3 K5 Z5 \% f( U1 R
5 R; T" e3 i6 }5 w
谢谢!
6 p6 @0 W: n& F. J( V
' [- e, H: j& r2 u* ?/ \[ 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)};"       + d" c7 G6 E9 {& f0 ?% o
        set conn=server.createobject("ADODB.CONNECTION")% T: E; R3 y& w4 ?' J/ _
        if err.number<>0 then
& h- \4 ?8 f( q; N; ]" E3 w2 _                err.clear
2 k* Z! y+ M: [" i( @! t                set conn=nothing
1 Z. z& j. q/ C2 m* m' U                response.write "数据库连接出错!"
' P/ |5 B2 z0 H* s                Response.End
7 W9 W, b+ |. m- s6 d        else
' f3 }8 O9 B- H9 K                conn.open connstr  M- x! [: l0 h& y
                if err then
, _2 q7 ?2 a5 v$ v( ?: ~. x4 e# {                        err.clear4 o, M$ }* y3 ?- H7 Y, u
                        set conn=nothing
4 ^. ~, |* E5 G+ ]                        response.write "数据库连接出错!"
# B' N) M& C/ \0 W* p1 g( }7 c                        Response.End
! Y" w. a0 U. W                end if
5 p; r" `1 ]5 E; |/ T        end if# D2 s- c0 J' r& M( O3 R& b
看错了你的问题。有可能是你的server.mappath设置的问题。3 c+ B4 J8 s  G. b# _  b6 e

% d. D  h) D  Q2 P- 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 | 显示全部楼层
错误信息是:7 y; a5 \5 V% y  \, `' U
ADODB.Connection.1 error '800a0bb9' ' x2 O4 a+ S" Y/ Q# w3 h5 F2 u

+ U7 g1 A  T; J* p- O) xThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
: P3 ~8 L$ q9 h5 d9 w9 c. B
, C+ s! o2 Y9 F" q% a1 i我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-5-14 19:12 , Processed in 0.138193 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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