CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
ADODB.Recordset (0x800A0BCD) Either BOF or EOF is True
- Article ID:
10 - Date Created
Sunday, September 26, 2010 - Last Updated
Wednesday, November 17, 2010 - This Article Has been Viewed
3176 times - Short Desc
This happens when the record is black. Make sure that there is a record infact in the column of your database. If not, then show the user a friendly error message. - Details
When you create your sql query, you have to make sure that if a record does not exist, you show the user a friendly message informing them that the record does not exist.
The error you will get is:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/MyList.asp, line 61 - Recreate Issue
Example:
<%
Set getSQL = CreateObject("ADODB.Command")
getSQL.ActiveConnection=objConn
getSQL.Prepared = true
getSQL.commandtext="SELECT colID, colName, colDesc FROM Table1 where colID=?"
getSQL.Parameters.Append getSQL.CreateParameter("@colID", adInteger, adParamInput, , strcolID)
set rsgetCol = getSQL.execute
%>
<%
=rsgetCol("colName")
%>
now, with the code above, if the colName is blank for the record that is being queried, you will get the error. - Resolve Issue
Example:
<%
Set getSQL = CreateObject("ADODB.Command")
getSQL.ActiveConnection=objConn
getSQL.Prepared = true
getSQL.commandtext="SELECT colID, colName, colDesc FROM Table1 where colID=?"
getSQL.Parameters.Append getSQL.CreateParameter("@colID", adInteger, adParamInput, , strcolID)
set rsgetCol = getSQL.execute
if rsgetCol.eof then
response.write"Sorry, the record does not exist or has been removed from our database."
else
getCol = rsgetCol("colName")
end if
%>
<%
=getCol
%>
Looking at the code above, you can see that it is using an<%
if not tsgetCol.eof then
end if
%>
This will run a check against your database, if the record does not exist, it displays a nice little warning message, if the record does exist then it displays the record.
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825