Subject: ODBC Drivers error '80004005'
Posted By: sanju2006 Post Date: 8/31/2006 3:22:54 AM
I am receiving this error messege after uploading my asp page on my hosted web server.


Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[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.

/cgi-bin/usersubmit.asp, line 21


Somebody help me to get rid of this problem since I am on strict deadline to complete this assignment. I am also sending the asp code herewith:
#####################code starts ere#################################


<% @LANGUAGE=VBScript %>
<%

<!-- #INCLUDE FILE="adovbs.inc" -->

Dim returnValue
Dim conn
Dim comand
Dim rsCheckUser

Dim sqltxt

set conn = server.CreateObject("ADODB.Connection")

Conn.Mode = 3      

set rsCheckUser = server.CreateObject("ADODB.Recordset")

'conn.Close
'set conn=nothing
conn.Open "db1"

If LCase(Request("userid")) = "cifyinfosoft" AND Request("userpass") = "administrator" Then  
      Session("loginfailure") = False    
    Response.Redirect("http://www.cifyinfosoft.com/login/adminindex.asp")
End If

rsCheckUser.CursorLocation = 3

sqltxt="SELECT * FROM registered WHERE User_Name='" & LCase(Request("userid")) & "' AND Password='" & Request("userpass") & "'"

'returnValue = rsCheckUser.Open sqltxt,conn,1,4

rsCheckUser.Open sqltxt,conn,1,4

if rsCheckUser.State=adStateOpen then
      Session("loginfailure") = False
      blnValidRequest = True
else
      Session("loginfailure") = True
      blnValidRequest = False
end if

'If returnValue = 1 Then
'      Session("loginfailure") = False
'      blnValidRequest = True
'Else
'      Session("loginfailure") = True
'      blnValidRequest = False
'End If

rsCheckUser.Close
set rsCheckUser =nothing
conn.Close
set conn=nothing


If blnValidRequest Then
      Response.Redirect("http://www.cifyinfosoft.com/login/bcaindex.asp")
Else
      Response.Redirect("http://www.cifyinfosoft.com/login/login.htm")
End If

%>


#####################code ends ere#################################


Reply By: dparsons Reply Date: 8/31/2006 6:51:29 AM
It sounds like you have either A) Opened the database and forgot to close the connection (which would cause it to be locked) or B) you do not have rights to the database.  Also make sure you are pointing at the correct MDB file.

"The one language all programmers understand is profanity."
Reply By: thechasboi Reply Date: 8/31/2006 8:56:33 AM
sanju2006

It has been my experience in these sorts of cases or errors if you will, the database you are trying to open with the web page maybe already open or was open just before you tried with the web page.  I found that if I have the db open in access messing with it then try and access it through the web page it gives me an access error.  So my suggestion is to look in the folder that contains the databse just before you open it in the web page and look for that anoying temporary file that is inserted when you open from office.  If this file exists while or is closing, or just closed within a few seconds of trying the database you get a lock out of the database.  I am sometimes able to retry the connection but most of the time I need to either disconnect from the network completely and try again or restart the darn machine.  This will let the locked connection go and allow it to be used by other people and yourself.

I hope this helped.

Charley George
Programmer
Computer Engineer
just graduated
Reply By: Imar Reply Date: 8/31/2006 9:21:22 AM
Hi there,

The error you listed is most likely related to security settings.
If you Google for "Microsoft OLE DB Provider for ODBC Drivers error '80004005'" you get loads of useful hits, including this one that explains how to fix it:

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=263

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.

Go to topic 49118

Return to index page 188
Return to index page 187
Return to index page 186
Return to index page 185
Return to index page 184
Return to index page 183
Return to index page 182
Return to index page 181
Return to index page 180
Return to index page 179