且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP Classic:尝试连接数据库时出现问题。

更新时间:2022-06-09 10:07:10

schurst30写道:
schurst30 wrote:

您好,我目前正在尝试重新使用ASP并且已经开始在几年前开发的旧网页上查看

,它功能齐全

回到了2002年,我把它运行起来没有任何问题。我刚刚买了一台装有Windows Vista家庭高级版的新电脑,并且已经安装了IIS。
Hi, I am currently trying to get back into ASP and have begun looking
at an old webpage I developed some years ago, it was fully functional
back in 2002 and I had it up and running with no problems. I have
just recently bought a new PC with Windows Vista Home Premium on it
and installed IIS.



真的吗?我没有使用Vista,但我的印象是IIS

不会在Home版本上运行。

Really? I don''t use Vista, but I had been under the impression that IIS
would not run on the Home edition.


我尝试连接到我的数据库我得到

以下错误消息重新报告:


Microsoft OLE DB Provider for ODBC Drivers错误''80004005''


[微软] [ODBC Microsoft Access驱动程序]磁盘或网络错误。


/joynermorgan/take_registration.asp,第50行


第50行看起来像这样:


writeDB.Openjoynerm


joynerm是系统DSN我创建的连接到我的数据库。


以下是文件take_registration.asp中的实际代码

发生错误:
When I try and connect to my data base I get the
following error message retunred:
Microsoft OLE DB Provider for ODBC Drivers error ''80004005''

[Microsoft][ODBC Microsoft Access Driver] Disk or network error.

/joynermorgan/take_registration.asp, line 50
Line 50 looks like this:

writeDB.Open "joynerm"

joynerm is the system DSN that I created to connect to my database.

The following is the actual code from the file take_registration.asp
where the error is occuring:



<无相关>


这很可能是权限问题。 Access

数据库的所有用户都需要对包含数据库文件的

文件夹进行修改(读/写/创建/删除)权限。 陷阱就是那个用户在

IIS可能不是你,具体取决于你如何配置你的网站。

如果启用了匿名访问,那么用户也是如此。是互联网访客

帐户(又名IUSR_machinename)。因此,如果您尚未授予该文件夹的IUSR

帐户权限,那么您的asp页面将无法进行
建立连接。


请点击此处了解更多信息: http://www.aspfaq .com / show.asp?id = 2009


此外,它与你的问题无关,但你应该停止

使用过时的ODBC DSN。请参阅:
http://www.aspfaq.com/ show.asp?id = 2126

-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。我的From

标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将获得更快的回复。

<none of which is relevant>

This is most likely to be a permissions problem. All users of an Access
database require Modify (read/write/create/delete) permission on the
folder containing the database file. The "gotcha" is that the "user" in
IIS may not be you, depending on how you have your website configured.
If Anonymous access is enabled, then the "user" is the Internet Guest
Account (aka IUSR_machinename). So if you have not granted the IUSR
account permissions for that folder, your asp page will not be able to
make the connection.

See here for more: http://www.aspfaq.com/show.asp?id=2009

Also, it''s got nothing to do with your problem, but you should stop
using the obsolete ODBC DSN. See:
http://www.aspfaq.com/show.asp?id=2126

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.


Bob Barrows [MVP]在2007年8月20日写的

microsoft.public.inetserver.asp.general:
Bob Barrows [MVP] wrote on 20 aug 2007 in
microsoft.public.inetserver.asp.general:

真的吗?我没有使用Vista,但我一直认为IIS

不会在Home版本上运行。
Really? I don''t use Vista, but I had been under the impression that IIS
would not run on the Home edition.



IIS不在Home-Basic之下,但在Home-Premium之下。


-

Evertjan。

荷兰。

(请在我的电子邮件地址中将x'变为点数)

IIS doesn''t under "Home-Basic", but does under "Home-Premium".

--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


感谢您输入Bob,我检查了wwwroot中所有

文件夹的权限设置,并且用户,创建者,系统等都设置为完整

现在控制?这是否排除了它可能是一个权限

问题的事实?


我确实改变了我连接到你建议的方式抛出一个

不同的错误信息如下:

Microsoft JET数据库引擎错误''80004005''


未指定错误


/joynermorgan/take_registration.asp,第54行

Thanks for your input Bob, I have checkedc the permissions settings for all
folders in wwwroot and the users, creator, system etc is all set to full
control for now? Does this rule out the fact that it could be a permissions
problem?

I did change the way I connect to the way you suggested which throws up a
different error message as follows:
Microsoft JET Database Engine error ''80004005''

Unspecified error

/joynermorgan/take_registration.asp, line 54