埃德蒙顿华人社区-Edmonton China

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

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

[复制链接]
鲜花(9) 鸡蛋(0)
发表于 2004-11-24 16:53 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
用ASP做了一个主页,刚申请了一个空间,结果在我自己机器上好好的程序传上- H/ N5 G8 N' j# p+ |) l7 \
去后就不能用了,显示我的数据库连接有错误,我的语句是:
; _! [  s1 C, d* u% h8 W* q$ G9 r; H
   dbc.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("databasename.mdb" )0 O6 y, C- {" [  N, E; Y
" E# h; r7 h8 U; y- P  {: s0 G
这有什么问题吗?为什么在我机器上好好的?是不是这个服务器不支持ACCESS' `7 C) e- L9 d! \3 Y& X
数据库?6 c6 H) p! H% d* c* A0 w0 T2 q! y2 [& ~

$ Z( Y) P9 O4 f2 t谢谢!
( f9 n& h$ k% D, F/ E! J( W* w+ |
[ 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)};"      
! |! Q. A' t5 X        set conn=server.createobject("ADODB.CONNECTION")) u+ |( G' W+ H/ K$ q1 m
        if err.number<>0 then
6 T; P+ N* `/ [) p2 n                err.clear* |0 q9 N2 k+ B( ~6 U
                set conn=nothing
6 Y6 t5 ]! p% |3 M* g                response.write "数据库连接出错!"  Z. `! I9 G8 K* A' H/ q3 U
                Response.End2 h* O) q$ I0 _
        else
* j/ I; t! u$ s. T. h& V; _% x& _/ c                conn.open connstr% h8 z: m6 k, S. G+ c" K" }+ j
                if err then . G5 I2 @1 V4 i
                        err.clear
* d$ P; M$ r* ^6 m                        set conn=nothing, i( t( |' d; z/ O
                        response.write "数据库连接出错!"
4 ]" X% |% O, }$ _: p' K. h) s                        Response.End 8 F8 B4 v( \- {# L2 H5 v8 h6 T
                end if
/ ^3 X& [) [7 n& |( C        end if% i$ c2 Z  y: @  \
看错了你的问题。有可能是你的server.mappath设置的问题。
; j  ~, s# O5 V4 W$ ~7 Y0 X! Z8 y; L9 B6 J5 r& b9 d& s) T
[ 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 | 显示全部楼层
错误信息是:: a7 A# q8 p4 l0 d5 s6 ^5 |4 {4 E
ADODB.Connection.1 error '800a0bb9'
0 @+ ?" v: }% j6 d4 q
+ ~# F) F! e$ \, y% QThe application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
) c9 g- p* j. K% A8 }3 V7 N0 G3 e" g# S2 s
我也觉得是不支持ACCESS,不过租前曾专门电话问过,说可以啊。
鲜花(0) 鸡蛋(0)
发表于 2004-11-24 18:51 | 显示全部楼层
那就是不支持了,数据库连接故障有很多种。
鲜花(2) 鸡蛋(0)
发表于 2004-11-24 19:42 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
应该是服务器端的ODBC没设置好。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT-7, 2026-4-6 15:33 , Processed in 0.367494 second(s), 17 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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