埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上- Q+ i2 [  \7 {' ?2 Z
去后就不能用了,显示我的数据库连接有错误,我的语句是:
. z' K5 r; V( T" c" w8 R% W8 d
0 U! d5 j/ z) r  L9 a" S8 m2 C   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" ), i4 v, s( f+ ]- W. r& W1 C
, v* u( l  g  l' S( e2 r: x0 a
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS9 O" q0 ]- ]5 x
数据库?. @. \  W8 K3 y  L

  ^1 e* [* G$ o, p/ ~  C谢谢!
) S. U* v: H+ L8 H5 W% Z/ m
3 \$ U$ A! v1 j" J& Z% y$ _[ 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)};"      
3 Y2 ?" t% ^- v; {: Z; @2 h: d        set conn=server.createobject("ADODB.CONNECTION")9 ?8 G, x1 f: ~! V# Z
        if err.number<>0 then
  H1 ^8 K4 m; \; F, \; X" u* w                err.clear) U! z- @7 V% p
                set conn=nothing$ Y+ u# t& F4 o/ Q7 W8 D
                response.write "数据库连接出错!"' A3 W0 z  P# k/ f' X) x- b3 B  X1 x
                Response.End
( G. j2 `* u8 n' H+ u6 N2 ]& ~        else
. q" C9 x" f" T$ R9 V% }+ b6 o" q3 W: R                conn.open connstr
3 e$ ^( j8 u# O' R' `" J7 [                if err then 7 Z+ a0 P& q3 z. @0 z5 w
                        err.clear
6 m3 z* y8 W2 X, `                        set conn=nothing( L6 ?! x( U8 H6 L) _
                        response.write "数据库连接出错!"
9 @1 X4 ^, ~! t9 L. B7 x, n0 U                        Response.End
& B3 I9 w: G' _. C( m% Y/ f                end if+ M+ ]6 a' o1 j/ S
        end if
9 p. @, U1 m0 ^& i4 L! `看错了你的问题。有可能是你的server.mappath设置的问题。
9 e5 A# K! f5 ]6 [$ A- L% o
: L6 O: i# n0 r" }# i( d[ 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 | 显示全部楼层
错误信息是:7 _: m) z7 q% j6 ^
ADODB.Connection.1 error '800a0bb9'
( s3 i9 ~4 x% d, n$ C2 S, d
- b5 p" |/ F1 q5 T' h: W  M& Z4 ZThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. - b: r+ S' N( ^  G1 Z" N1 J
$ w1 R9 Z% f1 D/ `6 Q0 _3 X
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
理袁律师事务所
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-8-7 22:03 , Processed in 0.196186 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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