埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
4 Z: x* D  [6 |/ g3 B5 }去后就不能用了,显示我的数据库连接有错误,我的语句是:( U" s: _- e( p8 N- \0 q
5 h+ Q) M7 H6 u1 e8 \: g, @7 Y
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" ). g- r' U9 D' c1 ^# y4 ^3 w

& ^" _/ a& k: r7 D这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS# v/ K9 I5 N; N0 r
数据库?3 ?  B! d& b! u, p( y9 r8 G
8 p2 b( ^# S. ~& V- Z
谢谢!: Y( I0 \" L. o- J+ ]
  t& Z0 x6 x4 i& X
[ 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)};"       - o, c9 m. F" i
        set conn=server.createobject("ADODB.CONNECTION")
! y, q, ]3 m) D; Y- [        if err.number<>0 then
+ x& K3 B' J0 V! g: Y                err.clear
9 ?" b3 d/ c! j7 K                set conn=nothing
7 ~8 z8 }- _0 Q# W5 p9 i( ]7 ?                response.write "数据库连接出错!"& S: B6 f' v; U2 z0 q! L; i- m6 i
                Response.End! l2 T. D: ?2 _. W, g( d  \
        else
. F, [5 q7 u! c1 @0 Y/ |                conn.open connstr, w0 G; S( S* J" K* V
                if err then ' _8 i1 e! B& H' E9 o/ ~# x
                        err.clear
, h8 X7 u6 I! W8 h. R                        set conn=nothing
( h4 O$ u# y8 [0 }+ G/ s' q                        response.write "数据库连接出错!"
% O  S8 N$ X- D* r& ]9 a                        Response.End
4 C! y% o- R+ S3 X9 Z; G( f                end if
* M! g# Z7 M3 `# g' J; @2 ^        end if
7 ^5 D6 e3 D3 V* b& d% g看错了你的问题。有可能是你的server.mappath设置的问题。/ |/ a! q; I! d+ A0 v( S

+ O" j3 `1 F8 N$ B- [7 r[ 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 | 显示全部楼层
错误信息是:
" v3 U9 P; V0 P& P/ ^ADODB.Connection.1 error '800a0bb9' ' W1 f+ Q/ G1 J# r- I

3 E; m0 s) z; C% ^# m6 ]5 FThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
) B  p+ r$ N" N: b" @# X3 Q2 d' V8 O
: g/ ~% K! M8 ]% G3 V9 N; }我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-4-26 00:52 , Processed in 0.137968 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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