埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上( _6 u% Z! i5 S8 V& ?
去后就不能用了,显示我的数据库连接有错误,我的语句是:- y9 P' ^# b0 A" `, V6 a9 L5 {! ?5 g" |
3 _1 B4 [0 o/ C1 m3 g
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
/ D; q5 g/ m! O& T) {( R- K; E! J3 z# \/ W9 V5 i3 }2 F
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
4 r# [$ [0 j/ c2 ]+ C; }) B7 X数据库?
) l% Y6 l. W4 V) M! n0 I/ V6 v6 x& ?8 |7 G, z
谢谢!9 s* V0 D5 E  S6 j0 t: C, a3 ?
6 D2 C. c# {* t4 l
[ 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)};"       0 z2 ?, W3 P: {, O; W
        set conn=server.createobject("ADODB.CONNECTION")
' c- B& _' M8 a6 V1 n! I' C7 W        if err.number<>0 then
0 o6 K# H" ?$ a+ w3 L. i                err.clear4 K2 y0 M' A4 k1 p- R
                set conn=nothing6 N" G3 K. x) L
                response.write "数据库连接出错!"
6 Q3 p' Z8 \" @/ i                Response.End3 n* p3 i' f* h
        else
# k% P0 C; x1 `* `1 \! Y$ L                conn.open connstr4 s* r5 _9 \% T, f
                if err then
+ _9 X) o9 @' |& m& L) A& l9 ^                        err.clear
5 ~0 ]4 u# h0 v" r7 J. N                        set conn=nothing' {3 [% G$ C  v5 z
                        response.write "数据库连接出错!"
2 C3 |. ^4 L( l0 }                        Response.End
$ s5 M) r  p) U4 _, l                end if4 m( Y( m4 e* q  v
        end if( `" ]! \* V" X8 c6 ^! e
看错了你的问题。有可能是你的server.mappath设置的问题。
& Y7 F+ F8 g/ {! a( a6 m; W' w
( k+ s2 }& r* I[ 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 | 显示全部楼层
错误信息是:, {, ^& a# H. S, T0 f. _/ z
ADODB.Connection.1 error '800a0bb9' , k8 R& J. B" U7 W& q
3 m7 d3 s+ N% N9 I) P4 Z# h
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
, Z# y4 J- i5 a1 K/ I  z% [+ a: [  i, K" P8 E, l( r
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-10-27 09:18 , Processed in 0.141795 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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