埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上+ N. {' M% u) P7 P6 K
去后就不能用了,显示我的数据库连接有错误,我的语句是:1 N! J0 Q' c3 S

5 U: u. a' o* K   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
) l4 W3 t' w& n- q. \: g1 g  T/ N" v# b) Q; T
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS
% W  s) ?- n+ c1 K数据库?
: q3 s/ V5 x: O7 o# |
3 i9 {6 _1 q# |7 _  i谢谢!
- a' Z3 y/ u1 [5 W+ s: f( P# |( x/ I5 o, E
[ 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)};"      
- P$ r6 n( V5 d# Y        set conn=server.createobject("ADODB.CONNECTION")* L6 k. `5 n) p7 m/ N  }
        if err.number<>0 then
& D# y* c1 h9 t+ ?: ~                err.clear( ~& k8 Z8 K9 W$ X' |* }% s  V
                set conn=nothing9 ^8 U$ [) }1 w/ M
                response.write "数据库连接出错!"
" A- E% _# g. J) |3 ?  {% f' K                Response.End
( o. i& q: {. v% p        else
% H4 X8 A5 a% S2 z% S                conn.open connstr) p5 |* E5 N  [
                if err then 3 v- b4 c' U2 H; e# E, h
                        err.clear1 G1 ?- D. n; Q# H
                        set conn=nothing
( U+ a% ?! x+ `8 K                        response.write "数据库连接出错!"
- S8 p) K6 x2 ^* b2 t, r! ^$ R                        Response.End : D2 \# _8 \, ~( n
                end if
  v3 I# |/ P8 d8 R* t" x        end if3 v0 O8 g; m7 u  ?) i$ z
看错了你的问题。有可能是你的server.mappath设置的问题。
2 w& a' X9 K! s& U* E
! i4 V* n- b* \& `* b8 a[ 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 | 显示全部楼层
错误信息是:* z. W! d8 a$ g  U! J, k, x
ADODB.Connection.1 error '800a0bb9'
( R& N9 ?* B: J9 E6 u+ ^. T
$ a# z# D) d7 nThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.   h  B  E7 h6 |% A: H" x

3 Z/ m' i% Y1 D& M8 [2 ^我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-11-28 17:03 , Processed in 0.341576 second(s), 16 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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