埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
$ L: ]) b) u' v- l5 C去后就不能用了,显示我的数据库连接有错误,我的语句是:' I2 g' ]4 U1 M' z
/ j" a7 G" ~+ y/ x8 p+ U3 [
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )4 I( w% ?  Y, U  P3 y8 I1 a* p8 ^
! }4 a+ E  j0 f
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
( m# W2 v  V% R数据库?
% p5 T2 L/ Q/ a% `: B0 ^1 H" s. ]7 v) g% k& F" O6 a
谢谢!0 L  w! L/ T  d/ q  H
% Q* g# b5 V1 C
[ 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)};"      
5 Q! a3 p! I; B- q, ~8 x% ~        set conn=server.createobject("ADODB.CONNECTION")
4 q3 \8 u3 v5 P        if err.number<>0 then   e# m( T2 w$ z# L% Q) \
                err.clear
1 s, t  f. w$ O( W0 l, [+ \% N                set conn=nothing
/ E% F; g' k$ N" N, s9 m5 T: I/ x                response.write "数据库连接出错!"1 y  G, `' D, n6 v7 Q9 M: Y0 K
                Response.End
! M% Q1 B) ]9 _' u! X, S        else
9 e$ B; N. }. s                conn.open connstr7 [; d! b, M3 V1 k8 V
                if err then 6 {+ p( E4 V' q. @6 [. A2 R
                        err.clear; j: A  _! _" H6 m) s# q5 `
                        set conn=nothing
4 c$ C+ `3 N2 A# Z+ C                        response.write "数据库连接出错!"; c3 N: \4 _: l* `" ^8 q
                        Response.End 6 j7 N8 \& ]; r& m$ B- x2 H
                end if
3 ^% X8 S  ]+ n        end if
- _7 |0 I7 ^- Q! s4 p: W9 u看错了你的问题。有可能是你的server.mappath设置的问题。
9 B9 X0 t! R3 Y. o6 I! j% \! F
. r+ P) Z9 w$ i1 }[ 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 | 显示全部楼层
错误信息是:
$ x0 v8 b$ h4 H& \6 H# yADODB.Connection.1 error '800a0bb9'
2 @3 p3 f, O: M) D3 B/ A" N) V* S& [0 K* i% ]
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
2 \4 @8 I- l+ W  d, P' V# D+ |6 ^! v. k8 I. u& H2 {8 S4 i; d: Q" V& j7 y! u
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-8-24 21:15 , Processed in 0.196919 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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