Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. 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 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2006, 03:22 AM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ODBC Drivers error '80004005'

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 %>
<%



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#################################


 
Old August 31st, 2006, 06:51 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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."
 
Old August 31st, 2006, 08:56 AM
Registered User
 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to thechasboi Send a message via MSN to thechasboi Send a message via Yahoo to thechasboi
Default

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
 
Old August 31st, 2006, 09:21 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ODBC Drivers error '8007000e' rtr1900 Classic ASP Databases 15 October 25th, 2006 04:03 AM
ODBC Drivers error '80040e14' kucker6 Classic ASP Databases 2 June 1st, 2006 01:06 PM
ODBC Drivers error '80004005' caudy Classic ASP Databases 2 August 20th, 2004 02:20 AM
ODBC Drivers error '80040e14' Need help RBC827 Classic ASP Databases 6 February 27th, 2004 04:57 AM
OLE DB Provider for ODBC Drivers error '80004005' Routhg Access ASP 2 June 11th, 2003 07:02 AM





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