Solved

I've got an Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Posted on 2001-08-09
20
1,931 Views
Last Modified: 2012-06-27
Hello,

I work with ASP 3.0 on a IIS-server. Website: http://www.prono-foot.be
I use a connectionless-DSN to connect to my database (see tools.inc beneath)
Everything works fine with my database but after a while I've got the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x4e8 Thread 0x824 DBC 0xb9a1024 Jet'.

 /tools.inc, line 7

Sometimes this error-code appears and the morning after everything works again !
The code for my connection-string to open and close the database: (=tools.inc)

<%
Dim conntemp
set conntemp  = nothing
function OpenDB()
set OpenDB=server.createobject("adodb.connection")
strConnect = "DBQ=\\premfs2\sites\premium6\MEMBER\database\foot.mdb" & ";Driver={Microsoft Access Driver (*.mdb)};" & "PWD=pasw123"
OpenDB.open strConnect
end function

sub CloseDB
conntemp.close
set conntemp=nothing
end sub
%>

Last night I (08/08/01) I had the same problem , In the beginning it works fine and after a while I've got the error (see above). Than the morning after 09/08/01 the problem disappeared ! Can it be that two persons try to open my database at the same time and that it blocks or what can the problem be ? , it can't be my connectionstring because sometimes it works and sometimes it doesn't

Yours sincerely
Geert Robberechts

0
Comment
Question by:geertrobberechts
  • 7
  • 5
  • 4
  • +4
20 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 6367057
Try to change your connection string to OLEDB.
http://www.adopenstatic.com/faq/whyOLEDB.asp

hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6367064
So now your connection is as follows.

strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
             "\\premfs2\sites\premium6\MEMBER\database\foot.mdb");" & _
             "Password=pasw123;"


hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6367067
If you still get errors, check to make sure that you have MDAC v2.1 SP2 or later installed on your server.
To get the latest MDAC goto http://www.microsoft.com/data

hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6367069
Your answers to why use OLEDB and not ODBC is given by my above link
http://www.adopenstatic.com/faq/whyOLEDB.asp

hongjun
0
 

Author Comment

by:geertrobberechts
ID: 6367130
I've done what you said now I've got another error-message:

Microsoft JET Database Engine error '80040e4d'

Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

tools.inc, line 15
0
 
LVL 2

Expert Comment

by:DirkVe
ID: 6367196
Your database is configured to open it exclusive instead of shared. You can change this by opening you db in access, choose tools -> options. In the advanced-tab you can specify this. You can also change the locking (default = no lock).

I think the security should be ok, since you said that it worked before. The anonymous user should have write permission to the directory where the db is (for writing a temporary working file).

Another problem, looking at the result you got, could be that some security is set to your db to allow only certain UNanonymous users who are known in your domain/workgroup.

As I understand, the db is on another server? Otherwise you could try it with a DSN, but it will probably give the same error.
0
 

Author Comment

by:geertrobberechts
ID: 6367203
I've done what you said now I've got another error-message:

Microsoft JET Database Engine error '80040e4d'

Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

tools.inc, line 15
0
 

Author Comment

by:geertrobberechts
ID: 6367219
Comment to DirkVe :
I checked my database and it is shared and there are no Locks. But my database is hosted on www.Brinkster.com
I can't play as administrator. So I suppose I have to use a
DSN-less connection .
0
 
LVL 2

Expert Comment

by:DirkVe
ID: 6367261
Aha, Brinkster that sounds familiar.

I suggest using the function server.mappath to connect to your database. Here's some working code that I used once (also on Brinkster) and it works !!!

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("db\MyDB.mdb") & ";Persist Security Info=False"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open strConn

I have a database named Mydb.mdb in the db folder (as Brinkster suggests it). Eventually you can of course put it in another folder, but maybe it's more secure there (don't know why Brinkster suggests it otherwise).


0
 

Author Comment

by:geertrobberechts
ID: 6367272
Comment to DirkVe :
I checked my database and it is shared and there are no Locks. But my database is hosted on www.Brinkster.com
I can't play as administrator. So I suppose I have to use a
DSN-less connection .
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:geertrobberechts
ID: 6367300
Reply to DirkVe's comment:

But I'm a Premium member I pay for my web-hosting: so I have a /webroot and a /database directory instead of /db directory like the non-paying members. also Brinkster says to put the database-files in the /database directory for security reasons and they suggest to use the following code:


<%
Dim conntemp
set conntemp  = nothing
function OpenDB()
set OpenDB=server.createobject("adodb.connection")
strConnect = "DBQ=\\premfs2\sites\premium6\MEMBER\database\foot.mdb" & ";Driver={Microsoft Access Driver
(*.mdb)};" & "PWD=pasw123"
OpenDB.open strConnect
end function

sub CloseDB
conntemp.close
set conntemp=nothing
end sub
%>


0
 
LVL 2

Expert Comment

by:DirkVe
ID: 6367345
Try the following code:

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("db\MyDB.mdb") & ";Persist
Security Info=False"

<%
Dim conntemp
set conntemp  = nothing
function OpenDB()
set OpenDB=server.createobject("adodb.connection")

strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("database\foot.mdb") & ";Persist
Security Info=False" & "PWD=pasw123"

OpenDB.open strConnect
end function

sub CloseDB
conntemp.close
set conntemp=nothing
end sub
%>

This will work as long as you database is on the same site as your asp-page.

Give it a try and let me know if it works. The reason why Brinkster suggest the other way is probably to allow accessing the databse from another site also. And most important: they 'suggest', and they don't 'oblige'. What concerns security: there's no difference in the 2 solutions.
0
 
LVL 2

Accepted Solution

by:
DirkVe earned 250 total points
ID: 6367398
Hello,

I just looked at the site Brinkster.com and they suggest to use this:

sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("\db\foot.mdb") & ";"

BUT, they made a mistake since it has to be like this:

sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("db\foot.mdb") & ";"

(db instead of \db)


as you can see here:
http://www.brinkster.com/Articles/Databases/DSNLess.asp



Small question also:
Does your 'root' in Brinkster look like this:
/Webroot
/Database
If so, use ..\database\foot.mdb instead of databse\foot.mdb.

Hope this will work.
0
 

Author Comment

by:geertrobberechts
ID: 6367464
Reply to DirkVe's comment:

But I'm a Premium member I pay for my web-hosting: so I have a /webroot and a /database directory instead of /db directory like the non-paying members. also Brinkster says to put the database-files in the /database directory for security reasons and they suggest to use the following code:


<%
Dim conntemp
set conntemp  = nothing
function OpenDB()
set OpenDB=server.createobject("adodb.connection")
strConnect = "DBQ=\\premfs2\sites\premium6\MEMBER\database\foot.mdb" & ";Driver={Microsoft Access Driver
(*.mdb)};" & "PWD=pasw123"
OpenDB.open strConnect
end function

sub CloseDB
conntemp.close
set conntemp=nothing
end sub
%>


0
 
LVL 1

Expert Comment

by:ksenthilraj
ID: 6367474
Hai,

this problem is due to the permission denied may be. Check the following things.. Check the ldb file created when the database is open is still there in the same folder.

Then give the permission to the Machine name
i.e IUSR_Machine  previledges.

The next thing is check the sharing of the folder.


Example database connection
<%
Set con = Server.CreateObject("ADODB.Connection")
con.ConnectionTimeout = 15
con.CommandTimeout =  10
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("database\dailyReports.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "insert into dailyReports values('"& saveDate&"',"&saveChannels&","&saveMarconi&","&saveSe2025&","&saveSe2028&","&totalCalls&")"
Response.Write "update completed"
rs.Open SQL,con,3, 3
Response.Redirect "index.htm"
Response.Flush


%>


With Cheers
0
 

Author Comment

by:geertrobberechts
ID: 6367556
Reply to DirkVe's comment:

But I'm a Premium member I pay for my web-hosting: so I have a /webroot and a /database directory instead of /db directory like the non-paying members. also Brinkster says to put the database-files in the /database directory for security reasons and they suggest to use the following code:


<%
Dim conntemp
set conntemp  = nothing
function OpenDB()
set OpenDB=server.createobject("adodb.connection")
strConnect = "DBQ=\\premfs2\sites\premium6\MEMBER\database\foot.mdb" & ";Driver={Microsoft Access Driver
(*.mdb)};" & "PWD=pasw123"
OpenDB.open strConnect
end function

sub CloseDB
conntemp.close
set conntemp=nothing
end sub
%>


0
 
LVL 2

Expert Comment

by:DirkVe
ID: 6367618
Test This:

<%
Dim conntemp
set conntemp  = nothing
function OpenDB()
set OpenDB=server.createobject("adodb.connection")

strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("..\database\foot.mdb") &
";Persist
Security Info=False" & "PWD=pasw123"

OpenDB.open strConnect
end function

sub CloseDB
conntemp.close
set conntemp=nothing
end sub
%>

PS: I know you are a Premlium user and... <cut>  So you don't have so send that a 4th time ;-)
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6367856
If Setting IUSR permissions on the mdb doesn't work then there aren't any permissions set in the tmp dir try this also..

http://support.microsoft.com/support/kb/articles/Q174/9/43.ASP
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=115



Why does Access give me 'unspecified error' messages?     (262 requests)
Aside from the improper use of MEMO fields (see FAQ #9), this may be caused by the mode in which Access is opened. Unless otherwise specified, IIS opens Access databases with adModeUnknown... which has proven to cause random problems in certain configurations. You can overcome this by setting the mode to adModeReadWrite *before* opening the connection, such as:
 
<%
    cst = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
    cst = cst & server.mappath("/<pathtofile.mdb>")
    set conn = server.createobject("adodb.connection")
    conn.mode = 3 ' adModeReadWrite
    conn.open cst
%>
 
(If you know you have Jet 4.0 installed, you can use the following slightly more efficient method.)
 
<%
    cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    cst = cst & server.mappath("/<pathtofile.mdb>")
    set conn = server.createobject("adodb.connection")
    conn.mode = 3 ' adModeReadWrite
    conn.open cst
%>



also

ODBC connections are very flaky producing a variety of run-time error messages that OLEDB connections do not.  This sample uses an OLEDB connection hence it's "microsoft.jet.oledb...." vs. a connection string that contains "{microsoft access...}". The latter connection string/ODBC connection is far less reliable. See:
http://www.learnasp.com/learn/dbopen.asp for more connection string info. For example: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xda8 Thread 0x49c DBC 0x254d024 Jet'. occurs when connecting to data with "{microsoft access..." connection string whereas exactly the same data can be accessed with "Jet.oledb" string fine.

<Test Script Below>

<HTML><HEAD><TITLE>accesstest.asp</TITLE></HEAD>
<body bgcolor="#FFFFFF">
<%
on  error resume next
myconn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("nwind.mdb") & ";"
' the above string is recommended way to connect
' myconn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("nwind.mdb") & ";"
' the above connect string is VERY flaky
dim test(256)
dim errn(256)
dim errd(256)
for counter=1 to 255
   set test(counter)=server.createobject("adodb.connection")
   goodconn=true
   test(counter).open myconn
   ' have to test error here because if conn cant be created
   ' the errcount... line will fail
   vbserror=err.number
   errcount=test(counter).errors.count
   IF errcount>0 then
       DBErrNum=test(counter).errors(0).number
       DBErrDes=test(counter).errors(0).description  
    errn(counter)=DBErrNum
      errd(counter)="ADO: " & DBErrDes
      goodconn=false
   END IF

   ' VBScript Error Trap
   IF vbserror<>0 THEN
      errn(counter)=vbserror
      errd(counter)="VBS: " & err.description
      goodconn=false
   END IF
   If goodconn=true THEN
      errn(counter)=0
      success=success+1
   END IF
   response.flush
NEXT
for counter=1 to 255
   test(counter).close
   set test(counter)=nothing
next
response.write "Successful connections=" & success & "<br>"

for counter = 1 To 255
   errnum=errn(counter)
   IF errnum<>0 THEN
      response.write "#" & counter & " connection failed:"
      response.write errd(counter) & "<br>"
   END IF
next
%>
</BODY></HTML>
0
 
LVL 2

Expert Comment

by:AccessHelpNet
ID: 6369500
The error "Cannot start your application. The workgroup information file is missing or opened exclusively by another user. " will also be caused if you try to open a secured access database without also uploading and referencing the system.mdw security file associated with the database in your connect string.

regards,

Dave Kawliche
http://AccessHelp.net
http://1ClickDB.com
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6901297
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20034613.html
http://www.experts-exchange.com/questions/Q.20076937.html
http://www.experts-exchange.com/questions/Q.20165672.html
http://www.experts-exchange.com/questions/Q.20262772.html
http://www.experts-exchange.com/questions/Q.20264870.html
http://www.experts-exchange.com/questions/Q.20262777.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now