I really don’t understand this. I have a simple ASP with 3 div in it.
Each div has some HTML with list boxes fills values when page loads.
When ever I run this page, Most of the times it works ok but 3 times out of approx 10, i get this.
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/order_tracking/order_admin.asp, line 269
This line has this query written: THIS IS THE FIRST QUERY ON THE PAGE Error It say on the line where rsRecordSet.Open is written
<%Set rsRecordSet = Server.CreateObject("ADODB.Recordset")
rsRecordSet.Open "select top 1 * from orders order by id desc", cn
While not rsRecordSet.EOF
%>
<input type="text" size="15" id="last_order_no" name="last_order_no" value="<%=rsRecordSet("order_no")%>" disabled="disabled"/>
<%rsRecordSet.MoveNext
Wend
If rsRecordSet.State = adStateOpen Then rsRecordSet.Close
Set rsRecordSet= nothing
%>
Please suggest whats wrong…i would appreciate.
Sounds like internal database problem if it sometimes work and sometimes it doesn’t work.
Do you have lots of traffic? If so, you better move to modern database like SQL Server or MySQL.
Anyway, I will try those things first and see what happens:
Change the code to be:
Why it might work? Because the
Openmethod is using cursors and locks that might be “heavy”. UsingExecuteof the connection itself should be as “light weighted” as possible.Change the SQL statement to be:
Maybe it will help – Access is sensitive about field names sometimes.
Change the code to:
Maybe the
Select Topis doing some nasty stuff behind the scenes.As last resort before giving up, write Stored Procedure returning that single record and use it instead of raw SQL statement.