埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
( h8 M5 L# _& e1 R2 P6 C( m3 [去后就不能用了,显示我的数据库连接有错误,我的语句是:* J: J) N/ P+ R. m" X/ F
6 m9 P& B4 d& q2 t! h0 o
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )! y5 W+ T/ Q! U/ k( h
' X, v9 J( I, X% H$ a
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
( w: z6 P( W, j数据库?
9 [% z5 b1 o2 w6 n
5 g; G7 j$ r* S4 O7 S" }  @谢谢!9 O' }. j' ~7 t, S3 A. j
9 ]# |2 A- f  A3 L/ l  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)};"       " ]  C* H% a1 V* |
        set conn=server.createobject("ADODB.CONNECTION")) X2 T8 Y5 ]4 B; G  M
        if err.number<>0 then
- e. X. w# @/ L( S                err.clear; ^4 _# l$ U1 d# A
                set conn=nothing  j7 B1 t5 F6 H; \& X4 Z
                response.write "数据库连接出错!"% N3 e7 o. Y* Q. o3 J
                Response.End
5 Y, x8 d! D  V/ Q3 ]        else9 N6 ~* E/ e& i: F, g
                conn.open connstr0 Q' a- V9 l: D
                if err then 7 U7 S, Y9 q1 T) U" d( |3 R* R
                        err.clear
" Z* x  j! ~; E) m3 j% {                        set conn=nothing
- h$ A9 Z6 j- M/ j                        response.write "数据库连接出错!"
- w# }) I/ G" m) [# b                        Response.End 5 ?* f7 A; c: S0 N6 w. H
                end if
0 j& Q1 t7 F" m+ u, ^  h        end if& w: x7 s: Z, b# F& O! J6 g
看错了你的问题。有可能是你的server.mappath设置的问题。
& F6 Y2 z) Z7 w+ D' W
' v. {& K) s* p[ 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 | 显示全部楼层
错误信息是:
5 m$ B4 y; |8 {, M5 W9 yADODB.Connection.1 error '800a0bb9'
  |4 r& f  @- u. M  E  h% S$ J8 Y* w& A$ e
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 6 y; L& ?; l( M; B. R4 ~. B, o
+ h6 R2 m: {3 N3 |
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2024-6-18 13:55 , Processed in 0.105212 second(s), 16 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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