Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old September 13th, 2008, 09:55 AM
Authorized User
 
Join Date: Jul 2007
Location: Delhi, Delhi, India.
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default ODBC Error Type 0x80004005

Hi Friends

I am facing problem in line 317 indicated. Please anybody help me. I think it is a critical error. There is no description of the type of error.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] error
/Shopping1/shop$db.asp, line 317


Sub ShopOpenDataBase (connection)
dim dblocation
dim strconn
ShopInit
database= Session("db") & ".mdb"
dblocation=session("dblocation")
If dblocation<>"" then
   database = Session("dblocation") & "\" & database
end if
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath(database)
'strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=D:\webs\vpasp\data\shopping2.mdb"
Set connection = Server.CreateObject("ADODB.Connection")
on error resume next
connection.open strConn
Session("dbc")=connection
If connection.errors.count> 1 then
   Session("Openerror")="Shopping database failed to open with error<br>" & connection.errors(0).description & " <br>" & Session("dbc")
else
   Session("Openerror")=""
end if
End Sub

'************* Open Shop Database
Sub OpenDatabase(odbc,database)
Dim strConn
Dim strpath
dim rc
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath(database)
Set odbc = Server.CreateObject("ADODB.Connection")
on error resume next
odbc.open strConn
If odbc.errors.count> 1 then
   Session("Openerror")="Shopping database failed to open with error<br>" & odbc.errors(0).description & " <br>" & Session("dbc")
else
   Session("Openerror")=""
end if
Session("dbc")=odbc
end sub

Sub ShopCloseDatabase (connection)
on error resume next
connection.close
set connection=nothing
End sub

Sub UpdateContact()
Dim dbc
' on error resume next
     ShopOpenDatabase dbc
     Set objRS = Server.CreateObject("ADODB.Recordset")
     objRS.open "Customers", dbc, 3, 3
' objRS.open "Customers", dbc, adOpenKeyset, adLockOptimistic
' CheckError
    objRS.AddNew
    objRS("Firstname") = strFirstname
    objRS("Lastname") = strLastname
    objRS("Address") = strAddress
    objRS("City") = strCity
    objRS("State") = strState
    objRS("PostCode") = strPostCode
    objRS("Country") = strCountry
    objRS("Company") = strCompany
    objRS("Phone") = strPhone
    objRS("Workphone") = strWorkphone
    objRS("Mobilephone") = strMobilephone
    objRS("Fax") = strFax
    objRS("Email") = strEmail
        If strwebsite <>"" then
            objRS("website") = strwebsite
        end if
        if err.number <> 0 then
        response.write "Error : " & err.number & "- " & err.description
        response.end
    end if
'*******Error in Line

317 objRS.Update


        ShopCloseDatabase dbc
' ShopOpenDatabase
        LocateCustomer strLastName, strEmail
        Session("customerid") = strCustomerID

 ' CheckError
end sub

  #2 (permalink)  
Old September 13th, 2008, 02:43 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

80004005 errors are almost always related to security. You may want to take a look here and see if that helps: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=263

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old September 13th, 2008, 04:28 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

As I said in the other forum, look here:

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

That means you should change your lines that do this:

strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath(database)

to this:

strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(database)

Try it! Might not help, but if nothing else you might get a better error message.
  #4 (permalink)  
Old September 14th, 2008, 10:41 PM
Authorized User
 
Join Date: Jul 2007
Location: Delhi, Delhi, India.
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I tried this solution...

strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath(database)

After replacing that LOC with this LOC following error comes:

Error Type:
Microsoft JET Database Engine (0x80040E21)
error
/Shopping1/shop$db.asp, line 318




  #5 (permalink)  
Old September 15th, 2008, 01:20 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Fix your browser and get a better error message.

Click on the TOOLS menu
Click on the INTERNET OPTIONS menu item
Click on the ADVANCED tab
*UN*check "Show friendly HTTP error messages"
OK

Now try again. See if you get an error message that is a real message instead of just a number.
  #6 (permalink)  
Old September 18th, 2008, 08:40 AM
Authorized User
 
Join Date: Jul 2007
Location: Delhi, Delhi, India.
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I got no result with this...solution...

  #7 (permalink)  
Old September 18th, 2008, 06:26 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

As you have been told your error is far to friendly. The helpful people on this forum can only guess whats wrong. The steps Old Pendant gave you must be carried out for others to help you. You must post un friendly errors here, help others help you...

;;;I got no result with this...solution...
You were asked to simply turn of friendly errors. Are you saying the browser error message is the same with the "Show friendly HTTP error messages" UNCHECKED? Surely not....

Was it unchecked when you looked at it or did you uncheck it?

Wind is your friend
Matt
www.elitemarquees.com.au
  #8 (permalink)  
Old September 19th, 2008, 10:34 AM
Authorized User
 
Join Date: Jul 2007
Location: Delhi, Delhi, India.
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default

After unchecking Friendly HTTP error messages, I got following error:-

Error Type:
Microsoft JET Database Engine (0x80040E21)
error
/Shopping1/shop$db.asp, line 318

This error is exactly same as the last one.. That is what I meant, no result with this solution, problem remains where it was.


  #9 (permalink)  
Old September 19th, 2008, 06:30 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, for starters you could try using Google:

http://www.google.com/search?hl=en&q...=Google+Search

But that's not overly helpful. Looks like there are lots of possible causes of this error.

I *can* suggest one bit of debugging you can do that *might* help find the problem, but quite frankly it only has about a 1 in 10 chance that it will.

If you want to try it, change this line:
    objRS.Update
to these lines:
    connection.Errors.Clear
    On Error Resume Next
        objRS.Update
    On Error GoTo 0
    For Each oops In connection.Errors
        Response.Write "update error: " & oops.Number & ", " & oops.Description & "<br/>"
    Next
    Response.Write ""
    Response.End

This is only to be used temporarily, as an attempt to find the error.

If you try this and it shows any "update error:", then copy/paste them here.
  #10 (permalink)  
Old February 20th, 2009, 01:54 PM
Registered User
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Exclamation ODBC Drivers error '80004005'

All,

I'm getting the same error number, but different message.


Microsoft OLE DB Provider for ODBC Driverserror '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server 'D89SMLF1\SQLEXPRESS' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. /corridor/default.asp, line 102

Line 102 says:
RS.Update

What makes this a strange message is because, I can select from the recordset and retrieve data, but when I try to update the data I get the error above. This code also works on a computer running Windos XP, IIS, ASP 5.xxx. Now I'm running on Windows Server 2003, IIS, ASP 6.xxx. I don't know if it makes a difference, but I want to include as much information as possible. Under the ASP.NET tab in IIS, there is a version number for the ASP.NET and I can't clear it. Does that matter?

Any help would be greatly appreciated becasue I can't continue until I get this fixed.

Thanks in advance,

Radfo




Similar Threads
Thread Thread Starter Forum Replies Last Post
0x80004005 ODBC Error in ASP Script hbansal ASP.NET 1.0 and 1.1 Basics 1 September 12th, 2008 03:09 PM
Error Type:Server.MapPath(), ASP 0171 (0x80004005) phantom3008 ASP.NET 1.0 and 1.1 Basics 2 April 26th, 2007 02:28 PM
Error Type: (0x80004005) Unspecified error wilfree Classic ASP Databases 3 April 3rd, 2007 09:04 AM
(0x80004005) Unspecified error MiltonAbreu Classic ASP Components 6 July 7th, 2004 11:34 AM





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