|
 |
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

November 5th, 2003, 02:25 PM
|
Registered User
|
|
Join Date: Jun 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
DB Connection not working XP
The following code is erroring out on my Windows XP machine when trying to access a MS Access 2000 database.
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = C:\Datastores\Home Notes.mdb"
The error that I'm getting is:
Error Type:
Microsoft JET Database Engine (0x80004005)
Unspecified error
/project/Datastore.asp, line 4
Line 4 is the objConn.Open statement.
I tested this code out on a Windows 2000 machine and it runs fine. I have also verified that the IUSR_xxxxx account has write access to the folder where the database is stored.
Can any one help.
Thanks
CO
|

November 5th, 2003, 03:32 PM
|
 |
Wrox Author
Points: 72,055, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
|
|
Hmmm, odd. This should work.
What are the access permissions for the database and the folder (Other that write access for the Datastores folder)?
Under what account is IIS running? Are you using anonymous access? If not the logged on user needs permissions as well.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

November 5th, 2003, 03:39 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Isn't it that Open is a method and not a property, and therefore should be like this...
Code:
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = C:\Datastores\Home Notes.mdb"
Jacob.
|

November 5th, 2003, 03:42 PM
|
 |
Wrox Author
Points: 72,055, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
|
|
Whoops, missed that.
Funny things is, I pasted the sample code in a test page, followed by:
If objConn.State = adStateOpen Then
Response.Write("Open")
Else
Response.Write("Closed")
End If
and it wrote Open......
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

November 5th, 2003, 03:45 PM
|
Registered User
|
|
Join Date: Jun 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Both IUSR and the account that I'm logged with have full access to the database folder and the database file. There is not any security set up on the database it's self. I ever tried logged in as the workstation administrator and it still is not working.
|

November 6th, 2003, 12:35 AM
|
Friend of Wrox
|
|
Join Date: Jul 2003
Location: La Jolla, CA, USA.
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Have you verified that you have Jet 4.0 installed on your machine?
As an alternate, please give this connection string (ODBC) a try:
For Standard Security:
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=C:\Datastores\Home Notes.mdb;" & _
"Uid=admin;" & _
"Pwd="
Found at:
http://www.able-consulting.com/ado_conn.htm
|

November 11th, 2003, 06:16 AM
|
Registered User
|
|
Join Date: Nov 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You dont have jetinstalled in your machine. i had the same problem. When i tested my kode it did not work, but it worked great after i uploded it to brinkster
ayhan
|

November 11th, 2003, 06:18 AM
|
Registered User
|
|
Join Date: Nov 2003
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
One more thing. You may have put wrong path dor your db. Check it again and put _ between home and notes. make the same changes in your file db section
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |