I am using sql server express and have two Select Statements on the same asp page. I have used the same statements on another page to gather similar data without a hitch. The only real difference I can see is that I am using a parameter in the Where clause of each that is fed by Request.Querystring on this page but with Request.Form on the other.
I keep getting this empty recordset error:
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
I have Response.Write the sql and it looks fine, i used it in the query analyzer and I get the proper results.
There are only a few records in each table so I exported teh data from each as csv and lined up my select statement under each column name to assure they were identical. Then deleted records (from the csv) that didn't match the criteria and the only ones left are the records that I expect to be in the recordset.
I have changed the way I apply the parameter several times with no luck.
Oh, I also check for the end of the recordset but it never seems to get that far.
First Select:
There is an end if later.
I also tried
Set Lcrs= conn.Execute(LSql)
And continue to get the same error.
I have also tried zid=CLng(Request.Querystring("ID"))
without any luck.
Any help would be appreciated.
I keep getting this empty recordset error:
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
I have Response.Write the sql and it looks fine, i used it in the query analyzer and I get the proper results.
There are only a few records in each table so I exported teh data from each as csv and lined up my select statement under each column name to assure they were identical. Then deleted records (from the csv) that didn't match the criteria and the only ones left are the records that I expect to be in the recordset.
I have changed the way I apply the parameter several times with no luck.
Oh, I also check for the end of the recordset but it never seems to get that far.
First Select:
Code:
'zid=Request.Querystring("ID")
Set Lcrs = Server.CreateObject("ADODB.RecordSet")
LSql="Select [ID], [teamname], [leaguedesc] FROM [leagueteam] Where [ID]='" & Request.Querystring("ID") & "'"
If Lcrs.EOF Then
Response.Write "Sorry, either your league has been deleted or it was never created."
There is an end if later.
I also tried
Set Lcrs= conn.Execute(LSql)
And continue to get the same error.
I have also tried zid=CLng(Request.Querystring("ID"))
without any luck.
Any help would be appreciated.