埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上* L! e( N9 ]6 B* F" y1 t; `
去后就不能用了,显示我的数据库连接有错误,我的语句是:
+ `$ t) \) G6 P  [5 O+ j+ L& _
# L7 {5 H- ?+ ~   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
" ]+ j; R: W+ o5 K3 W4 m* v3 i( G7 C2 ?
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
8 T4 v/ l5 M& K, X% }* D数据库?
1 w2 [1 h& W$ `2 k% h" |" F/ x( m, H; P' E4 f6 i. O
谢谢!8 |: S! L6 g/ j: x; M7 N

1 }3 s" I% L' g' t* [  K  }; n+ w[ 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)};"       % A  a6 C7 N( P$ Z0 n
        set conn=server.createobject("ADODB.CONNECTION"), x0 i: W* W: L8 m' D6 c- y
        if err.number<>0 then 6 t1 q8 S& ]# K) u! p# a
                err.clear
7 _# s3 A9 k" G: y; {6 D0 [                set conn=nothing
- @/ y' B0 U' Y2 D# s  @7 b, _                response.write "数据库连接出错!". D0 {9 g# i- W8 z
                Response.End6 V% ^( Q" N8 `, G
        else
7 H7 e- u7 G# Q                conn.open connstr
# E9 F5 J$ ^# Z                if err then
6 j0 c) e" T7 e6 C" u( Z! G                        err.clear/ ]6 d+ L: i8 M2 ^
                        set conn=nothing
' S7 i1 k) P# ~9 Y' R                        response.write "数据库连接出错!"9 a8 |: l& `: E6 S' ?: c# {
                        Response.End
1 `% W1 F- s* i) q6 W1 x  J                end if
+ f% l) o$ t# k% w        end if5 a; F$ \0 D4 }. P. l
看错了你的问题。有可能是你的server.mappath设置的问题。
+ C; @7 |+ z6 Z- a1 ?+ q
. `. G5 c! I; C, e% h0 f" S[ 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 | 显示全部楼层
错误信息是:9 `& n3 n; I, x# A* q
ADODB.Connection.1 error '800a0bb9' + }! b$ \5 w$ A! J8 s4 j3 \

8 Q, k( g% ^8 [The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. ! V, O  a9 U4 u- h
# \8 q# t. ?' a! h. ~/ V; s
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-6-28 01:43 , Processed in 0.223673 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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