No value given for one or more required parameters.

I am not a proficient asp programmer, though I (usually) get by. But today I have a problem. Any help would be GREATLY appreciated.

I have a simple website linking to an access database. The script works fine on my local machine. And it works fine on my regular host. However, I have uploaded the website to a Windows account with GoDaddy and here is my problem.

I am receiving the following error:

Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/home.asp, line 10

- the WEIRD thing is that if you hit refresh enough times, the page loads fine. Then, at random (it appears), the error resurfaces. No coding changes at all.

Line 10 is in red below:

<% @Language=VBScript %> <!--#include file="dbasepath.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<%
set dBaseConn = Server.CreateObject("adodb.connection")
set rs = server.createobject("adodb.recordset")
strConn = "Provider=Microsoft.JET.OLEDB.4.0; Data Source = " & dBasePath & ";"
dBaseConn.open strConn
strSQL = "SELECT * FROM Content where id=10"
rs.open strSQL, dBaseConn
%>

How can it work one minute and then not the next?
Can anyone make any sense of this for me please?
 
<%
dBasePath = Server.MapPath("access_db/filename.mdb")
%>

What's stumped me more than anything is that sometimes the site works, sometimes not. I just don't get it... :( I have been "trying" to do some dubugging here though with response.write. Just can't interpret what I've found, but maybe this will help:

OK - strConn returns:

SELECT * FROM Content where id=10

and dBaseConn returns:

Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=d:\hosting\domain\access_db\filename.mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False

Does that mean anything to you?
 
unclechris said:
<%
dBasePath = Server.MapPath("access_db/filename.mdb")
%>

[snip...]

OK - strConn returns:
SELECT * FROM Content where id=10

I assume you meant strSQL here, not strConn?

I would be very interested in seeing the contents of strConn, as I believe that it is probably missing the dBasePath part when the page fails. Why, I don't know; but that's what I suspect.

Put in a response.write for strConn and note its contents when the page fails.

riley
 
OK, it seems the problem was actually that 'id' was case sensitive. In the database it was 'ID'. Changing the SQL statement to

SELECT * FROM Content where ID=10

fixed the whole thing. Shame on me for writing sloppy case insensitive code.
 
Back
Top