Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Normal ASP connection to Access Fails, .Net Issue?

Status
Not open for further replies.

smuckers

Programmer
Mar 5, 2002
31
US
Good Afternoon:

I am trying to use a normal ASP program with approximately 50 asp files. The setup file that uses a connection string to MS Access fails. Now after trying the simplest of *.asp file connections to the MS Access Northwind.mdb database, that fails too. I tried using DSN & DSN-less connections. Prior to the install of .Net Framework, these connections from an *.asp file to MS Access worked.

My computer has a windows 2000 OS, XP Office and Visual Studio.Net configuration. I believe I have checked the correct permissions in the file folders, Internet Management Services and IE 6.0 advance settings.

Has anyone else tried their asp programs after installing .NET and ran into this same issue? Please offer any suggestions and I will be happy to doublecheck my work and settings.

Here is a sample of the simplest ASP file I could find. I have used several connection string variations and Server.MapPath("") method. I can get these strings to work on a computer without .Net.

Code:
<html>
<head>
</head>
<body>
<p>
<%
openStr = "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\inetpub\[URL unfurl="true"]wwwroot\Northwind.mdb;Uid=Admin;Pwd=;"[/URL] 
	Set cn = Server.CreateObject("ADODB.Connection")
	cn.Open openStr

When the code hits cn.Open.... I get these two types of error messages.

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'


OR: When using this string...

openStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\ Id=admin;Password=;"

I get the following error message:
Microsoft JET Database Engine (0x80004005)
Unspecified error
/Test.asp, line 10


Thank you in advance for any help or advice you can give.

Smuckers

May your hysterical randomness be cured!
 
try checking the permissions of the database and its folder. Make sure the IUSR account has write permission to the folder and the database.



Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Good Morning FesterSXS:

Thank you for your response. I doublechecked those settings and no luck so far.

Smuckers

"May your hysterical randomness be cured!"
 
Do you have the database open when trying to run the script?

There should be no reasoning for .Net to create conflicts that I can think of off the top of my head

___________________________________________________________________
[sub]
The answer to your ??'s may be closer then you think. faq333-3811
Join the Northern Illinois/Southern Wisconsin members in Forum1064
[/sub]
 
How would I add the IUSR account to the database and its folder? I am running Win XP Pro and trying to connect to a Access db with ASP.Net on my F: drive. When I right click on the folder the database is in and select properties, I see the General, Sharing, Web Sharing, and Customize Tabs. How do I modify the security? Thanks.

Julian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top