埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
" J. O# l8 k9 {" T去后就不能用了,显示我的数据库连接有错误,我的语句是:  j+ V  {3 j5 X. k, G+ C, Z7 j

" q1 ~$ u: |5 `$ X. r4 ~4 p3 U0 s   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
8 e9 u9 o; F, i( G* ?& h! y+ N- t% H. l7 I, q: ]
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS* n; B! `5 {2 r* m6 J* V' R) B
数据库?
/ J# m* v+ e4 i8 l6 f
! l  b8 ^; {) q* ?* A/ V谢谢!1 s2 ?0 ~* o3 R$ Z8 E7 a2 J

, i% ]- W1 N. a8 Y6 U[ 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)};"      
6 m* |, l  D8 e0 h        set conn=server.createobject("ADODB.CONNECTION")$ x. W3 s$ h* I2 N/ l: s
        if err.number<>0 then
! g$ a. t6 S0 o9 P7 n7 f# ~                err.clear( V3 u" Z' {( e4 E# Y1 E" L  v3 F$ d
                set conn=nothing* W# O" w, D2 l4 d& y  ^2 e7 p
                response.write "数据库连接出错!"
! q6 D& w9 ^* ]2 d                Response.End
; s3 L( l/ Z" O* |        else
. f' r) m. \( A; a. \7 `                conn.open connstr% i+ ~9 {) m) B* D7 V% O% T1 i5 m9 N
                if err then
$ G1 k& t  q; {, t, {) a* Z  m                        err.clear
: J1 {  A, \- s/ Q* `  f                        set conn=nothing
% {. B! L" n/ H                        response.write "数据库连接出错!"# {) w# I! Q( k  I4 x+ ]
                        Response.End % o& O/ w3 X# R- n2 h+ f
                end if
6 y' _. M$ o& ?, A# L$ }# c: E7 _        end if6 b# G+ j+ p) Q3 K( M# L
看错了你的问题。有可能是你的server.mappath设置的问题。8 ]. b5 Z$ s  ?) q' v; I: v
) L. X$ K# i) d  q0 ^  ]# b6 E/ h) `7 c
[ 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 | 显示全部楼层
错误信息是:( _0 K/ ~1 Z" x7 C2 e1 e1 V* r( m
ADODB.Connection.1 error '800a0bb9'
( L8 q1 }9 x; V# e+ y: b# r. v7 R+ t6 b% L, b
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 3 [/ z8 @  J( x/ p( q' x1 ?
8 ^* ~5 k9 X* U: J. ?$ _
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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