埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
( n) Q& L, r, K; u# y去后就不能用了,显示我的数据库连接有错误,我的语句是:4 S. ~( O6 d7 M+ l+ s

. p, F  r$ q( j   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
8 {; _' F: n, X9 l9 K1 I* n4 @* w6 G0 a6 {9 A* ?
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
# ?' X) u! m2 N. _: e% ^数据库?
: |; `: B7 ?: Z' D% f0 `2 i
" h! j; a* o0 a  I9 W% Y: O# j谢谢!- _4 x$ o4 ?% ^, i  Y1 H/ ^4 @
( A' T1 J& W" N: Z
[ 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) X' d- t- h
        set conn=server.createobject("ADODB.CONNECTION")
% \+ U* v2 ^& v$ |% V  P        if err.number<>0 then
3 P, S/ [. f7 `% F                err.clear3 o* l* u. G, b8 |! k0 Z9 V- _
                set conn=nothing/ S, F& S  {* Z+ m' \
                response.write "数据库连接出错!"
2 L, ~7 P- f2 Z$ i                Response.End
3 ?* c' G) L  y6 B        else1 i/ M: I" Z( h) J# o
                conn.open connstr
5 Q/ @, l& t+ ^# `# r( R                if err then
. S: p; |' h0 a# _1 K                        err.clear+ i+ c- Q, S9 j" ~9 D  K8 F
                        set conn=nothing- V' ~; {0 U! L" s9 u
                        response.write "数据库连接出错!"
3 \" N* z) g4 k" G* K                        Response.End
5 i2 E( |2 M- `1 E9 k! W/ `                end if
" w) ^8 C2 E0 ?! }, m1 J        end if
. u; i! D" Y8 k6 t; f( t0 ~看错了你的问题。有可能是你的server.mappath设置的问题。. {; W) C# U$ ?* `7 ]

7 t: J* N  q* f[ 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 | 显示全部楼层
错误信息是:
3 |. B% T. U, v& R1 ?" nADODB.Connection.1 error '800a0bb9'
  O" R( d% c+ W; G
+ l$ w4 Y2 S4 ?4 \9 ~The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.   q7 E7 j6 d  I" D$ c7 e
! I% b# X* N  j# u/ m
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-2-13 12:16 , Processed in 0.217282 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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