Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Message with Recordset

Status
Not open for further replies.

larryman

Programmer
Jun 16, 2000
63
US
Hi,
Can anybody help me with this problem, I get this error message when i try to query Access database from ASP page

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/webapps/minor/serviceorder.asp, line 28.

The code is below:

<% @Language=&quot;VBScript&quot; %>

dim dcnDB 'As ADO.Connection
dim rs 'As ADODB.Recordset




'Create the Connection Object
Set dcnDB = Server.CreateObject(&quot;ADODB.Connection&quot;)
dcnDB.ConnectionString = &quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot;_
& &quot;Data Source=f:\Aspdatabase\Database\userrequisition.mdb&quot;
dcnDB.Open

'Create the recordset object
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rs.Open &quot;SELECT * FROM User_info &quot; _
& &quot;Where Name= &quot; _
& Request(&quot;name&quot;) &&quot; &quot;, _
dcnDB

%>
Oysterbar ride to success. Keep Riding
 
Possibly caused by no having single quotes around the name field (assuming they aren't included in the sent-data). Try this:

'Create the recordset object
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rs.Open &quot;SELECT * FROM User_info &quot; _
& &quot;Where Name= '&quot; _
& Request(&quot;name&quot;) &&quot;';&quot;, _
dcnDB

also, you should set the SQL to a variable and then response.write it, it'll be easier to debug.

strSQL = &quot;SELECT...&quot;

rs.open strSQL, dcnDB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top