Posts: 488
Name: Chip Johns
Location: Savannah Georgia
|
Hi guys,
What ca I do ..
Situation:
User inputs a stock no for an item. When the item does not exist how can I redirect back to the initial form page?
The page receiving the form info first processes the StockNo against the database by way of an sql query (objSR1.)
Then another record set is pulled from another table using another sql query(objSR2) by using WHERE ItemID = objSR1("ItemID")
It works fine when there is an item with the stock number entered, but, when the stock number entered does not exist, the script bombs out during the 2nd sql query
I tried using an IF statement right before the second query like this
IF objRS1("ItemID") <> "" THEN
go ahead and process the query
process the rest of the page
ELSE
response.redirect("find1.asp")
END IF
******
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/admin/find2a.asp, line 72
Is there a better way??
Thanks,
|