埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上
) ^% B: m2 Q% R! X$ Q去后就不能用了,显示我的数据库连接有错误,我的语句是:
; n' D7 [8 V- P; u
; ~9 r& Y$ s" B   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
, i, p7 V$ h2 Q' p( S  D6 P7 e0 [8 q3 @$ Z& a" z" A: n- h. q7 G
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS( J) H( q$ t7 H
数据库?/ @" n9 s# s# N. `
2 [  B% W$ Z4 b. G
谢谢!
( I4 p) y3 Z7 S& X8 D: s6 u4 K5 W3 g( T9 x8 \- p- W3 A
[ 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)};"       * x, p+ f" K5 H- B
        set conn=server.createobject("ADODB.CONNECTION")1 z3 d6 T7 r5 o
        if err.number<>0 then ; a& s, p! n' O3 p2 q1 g; o
                err.clear& Z7 C; V. d% n
                set conn=nothing
* [- z! f9 ^( R7 s' C, ?                response.write "数据库连接出错!"! L1 J$ S1 X/ j1 w! f, W* E4 x
                Response.End
7 Z- \+ [( r0 L  g  ~: _% S        else, N2 G9 M, ^- _* \7 `  w
                conn.open connstr
7 J2 h* T( Y! E+ ]6 x, F                if err then 2 U/ \4 Y5 g) O/ i
                        err.clear- r0 C) G' \+ ]
                        set conn=nothing" v  k- o) i6 o- g) Y
                        response.write "数据库连接出错!"2 M. ?" ^  n6 H# q& S7 r4 s8 e
                        Response.End
( `8 n% k0 |4 C, }6 M- B3 E( {1 \                end if% a9 m' H& V/ H: {* Y
        end if
8 X! `) p+ E! h0 ?; w看错了你的问题。有可能是你的server.mappath设置的问题。; D' C8 G8 @% N" x: z. r/ w
- H% s. D- ^+ {& z' N3 [
[ 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 | 显示全部楼层
错误信息是:
* [' V3 I4 P0 V: GADODB.Connection.1 error '800a0bb9'
) m" @5 O1 C$ q$ o4 g. k/ E4 u$ r! M' \9 s9 U( C) x
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 8 [! l* W6 \5 k7 M( p! ^2 e

, W# E8 o( K1 {* Y! \8 |我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-11-14 12:08 , Processed in 0.094173 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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