埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
: y& ^8 ]( @* Q6 o去后就不能用了,显示我的数据库连接有错误,我的语句是:
% Y' D) e6 U3 v* W' Q" e6 t; P& u5 p1 w1 g6 k: R" G2 L3 v5 J4 C& W
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" ), G  I" O* g& j" x
9 \* ?# y9 o) E  [5 ~) T
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
# z5 B/ Z! Y: a数据库?
2 D5 t1 \+ g, f6 E1 V2 }4 }8 t1 `2 K, e* i
谢谢!. N6 J# A- R2 \  ?* I
# J4 Q. B0 h7 ]5 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)};"      
0 N( z/ v2 d# N% e" c' s: @        set conn=server.createobject("ADODB.CONNECTION")
* w' `: |+ [, i! W+ j        if err.number<>0 then
6 B: x/ x+ [$ O) ^" w  `                err.clear
4 D4 `, \8 B) g  y" G                set conn=nothing  i2 @1 P$ m- U4 ~
                response.write "数据库连接出错!"
8 B  A* g1 v5 T; j( y/ y8 b                Response.End* u. A, V9 h2 J$ a- N4 {
        else/ c" h+ S- h3 Y. l/ [$ T5 l% o
                conn.open connstr! s* S3 `$ {. O  `
                if err then " K. B( ~3 a4 R; b
                        err.clear
* l8 j# M: L. B1 j( v                        set conn=nothing: W, w( j5 B  j: R
                        response.write "数据库连接出错!"- z: B8 o2 `1 k3 P  Z
                        Response.End
8 u- X/ N: Y! e/ Q                end if9 @' |7 ?2 g/ Q7 W3 D/ [* j
        end if( [  S( q+ U: t4 J/ S* h* V
看错了你的问题。有可能是你的server.mappath设置的问题。
/ V7 O3 W6 }6 V" a" F" l: r- @- m* E$ l9 u
[ 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 | 显示全部楼层
错误信息是:
" ~/ G4 t. W! G  w2 lADODB.Connection.1 error '800a0bb9'
) I# k  @2 e) [, ^/ {! }3 Z, q. U4 `# m2 y$ I1 ]" w0 t
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. , Q3 B* T% L) g6 X) w! }5 j$ z0 Y
: \& v# q  d3 s3 }
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2025-6-11 01:52 , Processed in 0.167964 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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