wondergal
10-20-2005, 05:33 AM
When I execute my asp written page i encountered an error known as
<ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. >
But I've checked that my recordset did contain records and my session did not times out.
Enclosed are my coding which i suspect the errors might be raised from
<%
If gender = "M" Then
set rs=Server.CreateObject("ADODB.recordset")
rs.Open "SELECT age_category" & ageCategory & " As stdWeight FROM standard_male_BMI WHERE male_height = '" & roundedHeight & "'",dbConnection
sStandardWeight = rs("stdWeight")
obesity = ((tempWeight - sStandardWeight)/sStandardWeight) * 100
obesity = Round(obesity,2)
If (language = "TEXT") Then
If (obesity < 10.00) Then
obesityLevel = "Normal"
ElseIf (obesity >= 10.00 AND obesity <= 20.00) Then
obesityLevel = "Slightly Fat"
ElseIf (obesity > 20.00) Then
obesityLevel = "Obese"
End If
advice = "Standard Weight: " & trim(rs("stdWeight")) & "kg" & vbNewLine
advice = advice & "Obesity: " & obesity & "%" & vbNewLine
advice = advice & "Obesity level: " & obesityLevel
compareDesiredWeight = advice
response.write "<BR>" &compareDesiredWeight
Else
set rs1=Server.CreateObject("ADODB.recordset")
rs1.Open "SELECT * FROM pushMessageCHContent",dbConnection
If (obesity < 10.00) Then
obesityLevel = rs1("msg_normal")
ElseIf (obesity >= 10.00 AND obesity <= 20.00) Then
obesityLevel = rs1("msg_slight_fat")
ElseIf (obesity > 20.00) Then
obesityLevel = rs1("msg_obese")
End If
advice = trim(rs1("msg_std_weight")) & trim(rs("stdWeight")) & "kg" & vbNewLine
advice = advice & trim(rs1("msg_obesity")) & obesity & "%" & vbNewLine
advice = advice & trim(rs1("msg_remark")) & obesityLevel
compareDesiredWeight = advice
set rs1 = Nothing End if
set rs = Nothing
End If
%>
Can someone pls kindly point out to me what possibly cause this error? Ur help is very much appreciated. Thanks.
<ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. >
But I've checked that my recordset did contain records and my session did not times out.
Enclosed are my coding which i suspect the errors might be raised from
<%
If gender = "M" Then
set rs=Server.CreateObject("ADODB.recordset")
rs.Open "SELECT age_category" & ageCategory & " As stdWeight FROM standard_male_BMI WHERE male_height = '" & roundedHeight & "'",dbConnection
sStandardWeight = rs("stdWeight")
obesity = ((tempWeight - sStandardWeight)/sStandardWeight) * 100
obesity = Round(obesity,2)
If (language = "TEXT") Then
If (obesity < 10.00) Then
obesityLevel = "Normal"
ElseIf (obesity >= 10.00 AND obesity <= 20.00) Then
obesityLevel = "Slightly Fat"
ElseIf (obesity > 20.00) Then
obesityLevel = "Obese"
End If
advice = "Standard Weight: " & trim(rs("stdWeight")) & "kg" & vbNewLine
advice = advice & "Obesity: " & obesity & "%" & vbNewLine
advice = advice & "Obesity level: " & obesityLevel
compareDesiredWeight = advice
response.write "<BR>" &compareDesiredWeight
Else
set rs1=Server.CreateObject("ADODB.recordset")
rs1.Open "SELECT * FROM pushMessageCHContent",dbConnection
If (obesity < 10.00) Then
obesityLevel = rs1("msg_normal")
ElseIf (obesity >= 10.00 AND obesity <= 20.00) Then
obesityLevel = rs1("msg_slight_fat")
ElseIf (obesity > 20.00) Then
obesityLevel = rs1("msg_obese")
End If
advice = trim(rs1("msg_std_weight")) & trim(rs("stdWeight")) & "kg" & vbNewLine
advice = advice & trim(rs1("msg_obesity")) & obesity & "%" & vbNewLine
advice = advice & trim(rs1("msg_remark")) & obesityLevel
compareDesiredWeight = advice
set rs1 = Nothing End if
set rs = Nothing
End If
%>
Can someone pls kindly point out to me what possibly cause this error? Ur help is very much appreciated. Thanks.