埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上  @) d0 n9 d9 [, v* c4 w) _1 w
去后就不能用了,显示我的数据库连接有错误,我的语句是:8 }' {) O( y7 s5 F% |+ l7 A

; d+ z0 y9 b$ f* z2 y7 q   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )
; e5 _: E, G9 }' ?  i8 n3 y: O9 G1 n, [: m" K& {7 E
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS7 H7 C5 w$ h# E/ j
数据库?; F( q$ k. y* x- x: O3 s5 S8 E3 ?

; j3 c" x1 o( b谢谢!: J# B& o6 {5 t1 z+ N% Q

+ b# U! W7 y* ~& ~3 n[ 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)};"       9 a7 r1 `3 }- W4 S
        set conn=server.createobject("ADODB.CONNECTION")
1 T, x5 i: H, x6 }* W% b0 A        if err.number<>0 then ! W: H  Y6 _# l" g0 p4 `
                err.clear" S; [2 S+ i8 K# A/ W! w
                set conn=nothing4 W8 Y( F! ^: C1 d' l1 w) _
                response.write "数据库连接出错!". Y( @9 R/ R$ A$ d3 T
                Response.End
3 \3 q6 w6 x5 t9 D" g2 x/ d& n4 Q        else$ S' @8 B; C: a4 G5 L7 n+ Q
                conn.open connstr: P4 q7 j5 c' o/ Q4 C% G
                if err then
* p0 m. m0 E" H2 g7 {, }                        err.clear
6 a( `% B3 u6 }- O; I                        set conn=nothing9 L0 Z. B6 E2 Q1 w) {( F
                        response.write "数据库连接出错!"
3 X7 ?1 L) W% s, U; I                        Response.End 5 A7 V: J: E! O. d$ e
                end if; m4 l& u* X8 ~" A) I
        end if
( S3 r& S9 C8 a- p8 a! @! c, F看错了你的问题。有可能是你的server.mappath设置的问题。6 v4 `1 w( Z! t+ a# S) G

& [' P& Z) @) z0 Q[ 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 U! E4 B% G  x( F8 B( J# zADODB.Connection.1 error '800a0bb9'   `, I# _# U8 Z: W
3 ~+ R: b3 j3 s5 b2 I2 V
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
) S" ]* t  Q0 f7 a8 L4 E0 _5 \: S% N  o6 m+ j6 k
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-1-11 07:43 , Processed in 0.159694 second(s), 16 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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