注册 登录
编程论坛 ASP技术论坛

网站源码放入空间不能运行,请帮助!谢谢!

hongxiaodou 发布于 2014-06-03 08:55, 1409 次点击
我注册了国外一个免费空间,用来学习建立网站什么的,我将网站源码上传到上面却没法运行
当在config.asp中改路径为<%
 dim acc_db

 'Access���ݿ�����
 acc_db = "../data/db.mdb"
%>
时出现
Microsoft JET Database Engine error '80004005'

'\\172.16.0.4\www10\data\db.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

/_____10_/yzt365/connection.asp, line 11 的提示。

当修改为<%
 dim acc_db

 'Access?????????
 acc_db = "./data/db.mdb"
%>
时,出现Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/_____10_/yzt365/md5.asp, line 61

800401f3
的提示,我对asp与数据库一知半解,请老师能帮助分析解决。非常感谢。非常愿意结交朋友共同学习共同进步!


7 回复
#2
hxfly2014-06-03 11:28
按照下边的写法是对的,换一种数据源接口试试。
#3
hongxiaodou2014-06-03 12:23
请问是另外数据库吗?能说具体些吗?谢谢
#4
hongxiaodou2014-06-03 12:25
申请的是美国的www.空间
#5
hongxiaodou2014-06-03 14:00
以下是connection.asp所显示


<% @ language = "VBScript" codepage = "936" %>
<%
 option explicit
 'on error resume next
 dim db, conn, connstr, rs, sql, fso
%>
<!-- #include file="config.asp" -->
<%
 set conn = server.createobject("adodb.connection")
 connstr = "provider = microsoft.jet.oledb.4.0; data source = " & server.mappath(acc_db)
 conn.open connstr
 if err then
  response.write "数据库连接失败,请检查数据库是否已经正确安装,或者数据库的配置是否正确。"
  response.end
 end if

 dim dbmunber
 dbmunber = "1037_"

 response.buffer = true
 response.expires = 0
 response.expiresabsolute = now() - 1
 response.cachecontrol = "no-cache"
 response.cachecontrol = "no-store"

 dim myip, myiptemp, myclient
 myip = request.servervariables("http_x_forwarded_for")
 myclient = request.servervariables("http_user_agent")
 if myip = "" then
  myip = request.servervariables("remote_addr")
 end if
 myiptemp = split(myip, ":")
 myip = myiptemp(0)

 dim ename, etitle, eurl, elogo, ekeywords, edescription, ecopyright, echecktel, eservicetel, eserviceqq, etodayinfo, emailid, emailpw, emailsmtp, emember, eonline
 dim navpage, id, act, key, sql_where, page, recordnum, pagenumber, m, n, p
 navpage = 0
 id = saferequest(request.querystring("id"), 1)

 set rs = server.createobject("adodb.recordset")
 sql = "select * from [" & dbmunber & "config]"
 rs.cursorlocation = 3
 rs.open sql, conn, 1, 1
 ename = rs(0)
 etitle = rs(1)
 eurl = rs(2)
 elogo = rs(3)
 ekeywords = rs(4)
 edescription = rs(5)
 ecopyright = rs(6)
 echecktel = rs(7)
 eservicetel = rs(8)
 eserviceqq = rs(9)
 etodayinfo = rs(10)
 emailid = rs(11)
 emailpw = rs(12)
 emailsmtp = rs(13)
 rs.close
 set rs = nothing
 set rs = server.createobject("adodb.recordset")
 sql = "select [id] from [" & dbmunber & "member]"
 rs.cursorlocation = 3
 rs.open sql, conn, 1, 1
 emember = rs.recordcount
 rs.close
 set rs = nothing
 eonline = Application("ActiveUsers")
%>
<!-- #include file="function.asp" -->
<!-- #include file="md5.asp" -->
#6
hongxiaodou2014-06-04 08:41
有没有能帮助俺的?
#7
hu9jj2014-06-04 19:17
在自己电脑上测试了没有?
#8
hongxiaodou2014-07-10 22:03
自己电脑测试没问题
 
1