EasyCGI.com怎么用access数据库呀?总链接不到数据库
|
|
EasyCGI 有专门放数据库的DB目录,我已经把数据库放在里了,而且在控制面板中添加了一个dsn了。
但怎么程序运行时,总是没链到数据库呀,内容都是空的??为什么? |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2007-4-28 00:24:14
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
hate35
发表于 2007-4-28 00:29:18
|
显示全部楼层
正确咯。
那服务器放数据库的名字是db
我程序目录是post
ASP的数据库链接配置所以就是:../db/data.mdb
但就是不行。。。不知为什么 |
|
|
|
|
|
|
|
|
|
|
hate35
发表于 2007-4-28 10:09:10
|
显示全部楼层
我发邮件问那服务商了,他们回信这样写,能帮我看看什么意思吗,怎么做?
Your scripts or application are generating this error and you will need to review your code to make the necessary changes.
When a Microsoft Access database is in use, the server locks it to prevent the file from being deleted or modified.
A script that is working correctly will lock and unlock a database in less than a second. If, however, your scripts are not closing the database connection after a database query, the database will remain locked. There is a 5 minute timeout set on the server, which will eventually release the database connection, and allow you to overwrite the file, but if you have more that a few users per hour on your website, your database will likely always be in use. You will need to review your scripts and make sure that there is always a close connection string after every open connection string.
Your access database is currently locked, as indicated by the .ldb file in your db folder. Until this connection is broken, you will not be able to update or even delete the database.
Please make sure that your code allows for closing open connections. Also you can temporarily take down your site by renaming the index or default file to index1.html and placing a 'Down for maintenance' page up. You would only need to do this for a few minutes (5 to 10) to ensure all connections have been disconnected and then update or delete the database.
If you have any further questions, please feel free to contact us |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2007-4-28 10:29:26
|
显示全部楼层
他说你的程序可能有问题
access数据库每次查询服务器都回锁定,此时是不能更新的,查询完毕程序会关闭数据库连接,就可以更新了。如果程序查询完不关闭数据库连接,连接要5分钟以后才会失效。
他的意思可能是你的程序查询完毕没有关闭数据库连接,导致数据库不能更新
[ 本帖最后由 大漠孤狼 于 2007-4-28 10:35 AM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2007-4-28 10:31:53
|
显示全部楼层
|
另外你那种路径好像需要打开父路径支持,不知道他们是否支持。 |
|
|
|
|
|
|
|
|
|
|
hate35
发表于 2007-4-28 11:41:57
|
显示全部楼层
原帖由 大漠孤狼 于 2007-4-28 10:31 AM 发表
另外你那种路径好像需要打开父路径支持,不知道他们是否支持。
谢谢版主帮助。
程序是没问题的,我放在国内服务器上运行是正常的。但不知他们国外服务器是要怎么去设置的。
你说的父路径支持是什么意思?
如果我在那数据库配置文件以http://www.xx.com/db/data.mdb
这样写可以吗? |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2007-4-28 11:58:12
|
显示全部楼层
原帖由 hate35 于 2007-4-28 11:41 AM 发表
谢谢版主帮助。
程序是没问题的,我放在国内服务器上运行是正常的。但不知他们国外服务器是要怎么去设置的。
你说的父路径支持是什么意思?
如果我在那数据库配置文件以http://www.xx.com/db/data.mdb
这样写可以吗? ...
数据库路径问一下对方,每个空间不太一样。不过一般数据库路径不对会提示的,既然没提示估计是对的。
他说你的数据库是锁定的,所以不能更新 |
|
|
|
|
|
|
|
|
|
|
hate35
发表于 2007-4-28 12:05:55
|
显示全部楼层
为什么是锁定的?我又没操作,我按他们说明,把数据库放到指定的数据库目录db中呀。
晕晕的。。。不知怎么问他们好。
如果程序链接不到数据库应该在页面会出错错误才是。奇怪,程序页面可以打开,但就是没内容呀。
原本数据库是有内容的,我只是在国内的服务器数据搬过来而已。。。
唉。。。用不了的话,不租算了。
BTW:不知还有哪家可同时支持ASP,PHP的服务商,便宜点的。 |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2007-4-28 12:11:10
|
显示全部楼层
原帖由 hate35 于 2007-4-28 12:05 PM 发表
为什么是锁定的?我又没操作,我按他们说明,把数据库放到指定的数据库目录db中呀。
晕晕的。。。不知怎么问他们好。
如果程序链接不到数据库应该在页面会出错错误才是。奇怪,程序页面可以打开,但就是没内容呀。
原本数据库 ...
Godaddy可以,不过设置也比较麻烦,我弄了好几天才把dvbbs给装好,不过等我熟悉了就会提供教程出来。对ASP的使用不是很熟悉
感觉ASP的要比PHP麻烦的多,PHP没这么多乱七八糟的问题 |
|
|
|
|
|
|
|
|