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

August 13th, 2004, 08:18 AM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

August 13th, 2004, 10:49 AM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

August 13th, 2004, 03:07 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|

August 16th, 2004, 06:13 AM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

August 16th, 2004, 07:24 AM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

August 16th, 2004, 03:12 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|

August 17th, 2004, 02:38 AM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'll hopefully try it sometime today.
|

August 17th, 2004, 03:25 AM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

August 17th, 2004, 03:48 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|

August 18th, 2004, 02:51 AM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The datatype of ID is an AutoNumber
regards
Wayne
|
|
 |