Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 25th, 2008, 07:33 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Access Connection String Trouble

Hello all - The following connection strings:

Conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/DB/em.mdb")

Conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\wwwroot\em\DB\em.mdb"

are the two I have always used successfully with Access (2003). A couple of questions if I may.

> Am I using outdated strings or ones considered no ideal?
> Can someone please assist with what I may have missed relating to the following very annoying brick wall:

I have new XP pro machine. While getting everything up an running all of my sites using Access which were previously runing fine using the above strings are now giving me the following error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xb9c Thread 0xe48 DBC 0x1164024 Jet'.


I have checked permission on the folder holding the .mdb files, the .mdb files them selves, turned of any antivirus, win firewall. All steps I am aware of fail to rectify the issue. Now I turn to Google - After spending an hour researching the issue I have found no advice outside what I have done. last step the ever so helpful Wrox members

BTW - I have now given the EVERYONE user full rights the the folder/file and still no joy :(

TYIA or your time...

Wind is your friend
Matt
www.elitemarquees.com.au
__________________
Wind is your friend
Matt
Reply With Quote
  #2 (permalink)  
Old June 25th, 2008, 07:36 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Try to avoid using the Access driver.

It's ancient, buggy, and prone to this kind of stuff.

Look here:
http://www.carlprothman.net/Default....orMicrosoftJet

MUCH more reliable, in my experience.

SO:

Conn.Open ""Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=" & & Server.MapPath("/DB/em.mdb") & ";"

See if that doesn't work better.
Reply With Quote
  #3 (permalink)  
Old June 25th, 2008, 07:40 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

And by the way...

If Google didn't serve up these pages, you might look at them, if the JET driver doesn't work:

http://search.msdn.microsoft.com/Default.aspx?query=Unable+to+open+registry+key+'Te mporary+(volatile)+Jet+&brand=msdn&locale=en-us&refinement=

The first two links there give the same answer: Make a change in the registry.
Reply With Quote
  #4 (permalink)  
Old June 25th, 2008, 07:55 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Thankyou for the prompt reply...

Sorry I should have posted this one to:

Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/DB/em.mdb") & ";"

I always try to help myself before taking peoples time here. I got that on from connectionstrings.com which is a fairly good resource however this string gives me a very ambiguopus error:

Microsoft JET Database Engine (0x80004005)
Unspecified error

Very odd....I will look at your second link now

TYVM



Wind is your friend
Matt
www.elitemarquees.com.au
Reply With Quote
  #5 (permalink)  
Old June 25th, 2008, 08:00 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Man, that is WEIRD!

I assume you know that error number 0x80004005 is actually just a memory violation error? That is, something tried to access memory that doesn't exist (usually location 0x0000000) or maybe tried to write to read-only memory. Sometimes you see readable error messages associated with that number, which just means that somebody chose to catch the error and then re-throw it with a different message (but same number).

So that means you really are getting a *HARD* failure under the covers of the Open. Ugh. FWIW, by the by, I *am* running XP Pro and Access 2003. And I use the OLEDB connection string consistently, and I've yet to get that particular error.
Reply With Quote
  #6 (permalink)  
Old June 25th, 2008, 08:05 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

My morning is getting even wierder...

I just allowed full permissions in the:

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC

area of the registry, closed the reg and them refreshed the page to be told:


Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

Now I am very confused. This is a brand new machine aggghhhhh

Wind is your friend
Matt
www.elitemarquees.com.au
Reply With Quote
  #7 (permalink)  
Old June 25th, 2008, 08:07 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

for the benefit of others who may look at this post in the future the reason I done that in the registry was the following MS article:

http://support.microsoft.com/kb/295297

We shouldnt have to do this. I have never experienced so muxh troble getting an app running that was, and still is running fine on my old machine

Wind is your friend
Matt
www.elitemarquees.com.au
Reply With Quote
  #8 (permalink)  
Old June 25th, 2008, 08:11 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Did you see this one:

http://support.microsoft.com/default.aspx/kb/315456

I checked my %temp% variable and indeed it points to
C:\Documents and Settings\[username]\Local Settings\Temp

But that folder does *NOT* give IIS or EVERYONE any permissions at all. So I dunno how much to rely on that KB article.
Reply With Quote
  #9 (permalink)  
Old June 25th, 2008, 08:15 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

WHOOPS! NOT TRUE!

For my *OWN* user, that is the path to my %temp% folder.

But for System Variables, which is what would be used by IUSR_xxxx the path is simply
    c:\TEMP
and there indeed EVERYONE has write permissions.

Dunno if that helps, but worth looking at?
Reply With Quote
  #10 (permalink)  
Old June 25th, 2008, 08:23 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I have given Everyone full access to my personal and ensured this is present in the c:temp dir also.

After the registry permission change which resulted in:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

I restarted my machine, no change. in your opinion is the above error made my issue worse? Wow really stuck now...



Wind is your friend
Matt
www.elitemarquees.com.au
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection String to MS ACCESS jmss66 Classic ASP Databases 4 January 24th, 2008 06:54 PM
Connection string and file include trouble cramerjj Classic ASP Databases 2 February 26th, 2005 04:46 AM
Pocket Access Database Connection String mythios VS.NET 2002/2003 0 August 28th, 2003 12:50 AM
trouble with database connection databass Classic ASP Databases 1 August 15th, 2003 08:19 AM



All times are GMT -4. The time now is 07:23 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.