ADO

ADO

Post by eddie » Thu, 18 Apr 2002 20:29:29



help!

i'm trying to get some data from an ADO Recordset object and I keep on
getting the following error:

unknown error

code: 0x800A0CC1

the Connection object and the Recordset object load up the data from the
database OK but I can't retreive any data, as above

any help would be much appreciated

cheers,

eddie :-)

 
 
 

ADO

Post by Roy Fin » Thu, 18 Apr 2002 21:40:45


Eddie,

Sounds as if you may have a problem in the code accessing the fields
collection -- but that's just a guess.  Are you using recordset binding,
safearrays, or the Value property of the Field item to access the data in
the recordset?  What OLEDB provider are your using?

If you could post some code, we may be able to spot something that is not as
it should be.

all the best,
Roy Fine


Quote:> help!

> i'm trying to get some data from an ADO Recordset object and I keep on
> getting the following error:

> unknown error

> code: 0x800A0CC1

> the Connection object and the Recordset object load up the data from the
> database OK but I can't retreive any data, as above

> any help would be much appreciated

> cheers,

> eddie :-)


 
 
 

ADO

Post by Edward Chal » Fri, 19 Apr 2002 12:02:08



> Eddie,

> Sounds as if you may have a problem in the code accessing the fields
> collection -- but that's just a guess.  Are you using recordset binding,
> safearrays, or the Value property of the Field item to access the data in
> the recordset?  What OLEDB provider are your using?

> If you could post some code, we may be able to spot something that is not as
> it should be.

> all the best,
> Roy Fine



> > help!

> > i'm trying to get some data from an ADO Recordset object and I keep on
> > getting the following error:

> > unknown error

> > code: 0x800A0CC1

> > the Connection object and the Recordset object load up the data from the
> > database OK but I can't retreive any data, as above

> > any help would be much appreciated

> > cheers,

> > eddie :-)

hi Roy,

thanks for the response.

i looked up the error code and it is defined as:

adErrItemNotFound - 3265
0x800A0CC1 - ADO could not find the object in the collection corresponding to
the name or ordinal reference requested by the application

but i don't know why the collection should not contain the object!!

the code is accessing an .mdb (Access 2000) database - first a connection
object is created (executes ok) - then the recordset is created and loads data
from the database

 _bstr_t bstrQuery("SELECT * FROM tblOrders WHERE OrderID = 1");

pRecordset = pConnection->Execute(bstrQuery, &vRecsAffected,
adOptionUnspecified);

this executes ok as well - there are a couple of lines missing here, i've just
copied what seems to be relevant

then the program checks that there really is some data in the collection

if ( !pRecordset->GetEndOfFile())

then i declare a local variable

_variant_t vOrderAccepted;

and try to load up the value of the OrderID into this variable - as follows:

vOrderAccepted = pRecordset->GetCollect(L"isOrderAccepted");

and i get the com error !

help!!!!!!!!!!!!!!!

there is definitely a field called  isOrderAccepted in the table that is being
accessed; i have tried running the select statement as a one off query against
the database and it returns the correct values for any given order with the
OrderID specified - isOrderAccepted is a boolean variable, i get the same error
with integers in the recordset

cheers,

eddie :-)