Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 13th, 2004, 08:18 AM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft JET Database Engine error '80040e10'

Hi all,

I seem to be having a little problem with the below error appearing intermittently on my site, it doesn’t appear all the time, it will maybe only show up 1 in 10 times I visit the page. When I refresh the page it loads ok. I seem to work ok locally on my machine, that's to say I've never seen the error locally. I've searched the forum but can't find a solution.

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/carDetails.asp, line 15


Code:
<%
set conn = server.createobject("adodb.connection")
dbase = server.mappath(".") & "/db.mdb"
conn.open "provider = microsoft.jet.oledb.4.0; data source = " & dbase

SQL = "select * from cars where id = " & request("id")
set rsCars = server.createobject("ADODB.recordset")
rsCars.open SQL, Conn,1,3  <<line 15
'set rsCars = conn.execute(SQL)
%>
Hope someone can help.

Thanks in advance
Wayne

 
Old August 13th, 2004, 10:49 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dekel78
Default

I have functions that i'm using all the time:

<%


   Dim MyConnection
   Dim MyRS

'-------------------------------------------------------------------

   Sub OpenDB

       'Open The Connection To the DataBase
       Set MyConnection = Server.CreateObject("ADODB.Connection")
       MyConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("./main.mdb")

   End Sub

'-------------------------------------------------------------------
   Sub SetRSResults(SQL)

      Set MyRS = Server.CreateObject("ADODB.RecordSet")
      Set MyRS = MyConnection.Execute(SQL)

   End Sub

'-------------------------------------------------------------------
    Sub CloseDB

        MyRS.Close
        MyConnection.Close

    End Sub

'-------------------------------------------------------------------

Best regards
Dekel
 
Old August 13th, 2004, 03:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi there,

Check this out - 0x80040e10 - No value given for one or more required parameters

You can check that by using a RESPONSE.WRITE SQL and see if the sql statement is constructed as expected.

SQL = "select * from cars where id = " & request("id")
Response.Write SQL
Response.End

Now copy the resulting sql statement and execute that as a query in your access database and troubleshoot if that has any errors. If through without any errors, then proceed with that statement in your ASP code.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old August 16th, 2004, 06:13 AM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could it be a host issue? I'm getting the error on bargain-hosting. I've tried the same site on fasthost and haven't had the error.

If it was an SQL error surly I'd get the error all the time not just occasionally.

 
Old August 16th, 2004, 07:24 AM
Authorized User
 
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If it's intermittent it sounds as though under certain circumstances your request("id") is empty (such as when you have been going back through pages, or coming to the page from a different direction) - that would give you the error.

You might find it easier to see what is in request("id") if you store the value in a hidden field on the page, then when the problem occurs you can view the source to see exactly what value has been passed.

HTH
Pat

-------------------
System 3 2000 Limited
www.system3-2000.co.uk
 
Old August 16th, 2004, 03:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Wayne,

Did you try that with response.write as suggested in my previous post, you would know if request("id") has something in it. If it has no value, then you got to work on that.

_________________________
- Vijay G
Strive for Perfection
 
Old August 17th, 2004, 02:38 AM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'll hopefully try it sometime today.

 
Old August 17th, 2004, 03:25 AM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've used this code
Code:
SQL = "select * from cars where id = " & request("id")
response.write SQL
response.Flush()

set rsCars = server.createobject("ADODB.recordset")
'rsCars.open SQL, Conn,1,3
set rsCars = conn.execute(SQL)
and get the following error message

select * from cars where id = 46
Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/carDetails.asp, line 19


set rsCars = conn.execute(SQL) is line 19

regards
Wayne


 
Old August 17th, 2004, 03:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

What is the datatype of ID there in your table?
select * from cars where id = 46

Try to run this select statement in your access db, Queries --> New --> Design View --> Close.

View menu --> SQL View, paste this sql statement, and click RUN button from toolbar. Post us, if that runs fine.

If that is text type, then 46 should be wrapped around by quotes, and your SQL should look like...
Code:
SQL = "select * from cars where id = '" & request("id") & "'"
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old August 18th, 2004, 02:51 AM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The datatype of ID is an AutoNumber

regards
Wayne






Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft JET Database Engine error '80040e10' byronthurman Classic ASP Databases 5 June 8th, 2006 08:20 AM
Microsoft JET Database Engine error '80040e10' malhyp Classic ASP Databases 5 June 6th, 2006 10:07 PM
Microsoft JET Database Engine error '80040e10' froggzrevenge Classic ASP Databases 2 January 10th, 2005 12:44 AM
Microsoft JET Database Engine error '80040e10' shermttam Classic ASP Databases 9 December 10th, 2003 01:57 AM
Microsoft JET Database Engine error '80040e10' nvillare Classic ASP Databases 1 August 20th, 2003 12:09 PM





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