I cannot get the query to work. I am getting the following error message:
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
Can someone please help me to figure out what is wrong? The querystring is right. I suspect that it might have to do something with the comparison of the integers.
Let me show more code:
'Create a recordset
set rsCity = Server.CreateObject("ADODB.Recordset")
rsCity.Open sql, connectionString, adOpenDynamic, adLockOptimistic
'Initalize Error
Error = False
'Loop through all the records in the recordset to check that the user id and the e-mail address are not already in the database
Do While NOT rsCity.EOF
'Check to see if the database already has this city
If cLng(Area) = cLng(rsCity("AreaID")) then
Error = True
%>
<%
Exit Do
End If
'Move to the next recordset
rsCity.MoveNext
Loop
If Error = False then
rsCity("AreaID") = Area (this is the line that the error message is on)
rsCity.update