ODBC, CRecordSet - question 
Author Message
 ODBC, CRecordSet - question

hi,

i am opening a recordset like following:
 m_myrecordset.Open(CRecordset::dynaset, "SELECT * FROM MYTABLE");

and getting values of a dynamic bound recordset with
CRecordSet::GetFieldValue.
but if I use CRecordSet::GetFieldValue a second time to a column (I need
this in my appplication),
I get an error:

m_myrecordset.GetFieldValue("Column1", value);
m_myrecordset.GetFieldValue("Column2", value);
m_myrecordset.GetFieldValue("Column1", value);     // ERROR here

how can I solve this problem? can you help me?
thank you,
erguen



Wed, 03 Oct 2001 03:00:00 GMT  
 ODBC, CRecordSet - question
Many drivers does not accept to go back in the recordset. You can only read
the fields in their order in the SQL statement. You have two solutions :
change the order of the fields in the SQL statement or save somes values in
memory.

Fran?ois.



Thu, 04 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CDaoRecordset/CRecordset/ODBC Question

2. Questions on ODBC & CRecordset

3. ODBC CRecordset m_strFilter CString question

4. ODBC and CRecordSet Sort Question

5. EXCEL ODBC: Can CRecordSet Update spreadsheet?

6. CRecordset for ODBC 3.0

7. CRecordset/CDatabase broken by ODBC 3.5?

8. Using CRecordSet for ODBC joins

9. Oracle ODBC Drivers that support CRecordset::dynaset

10. Error updating SQL-Server record via ODBC (CRecordset)

11. CRecordSet class and ODBC connections - Too many connections

12. CRecordset (ODBC) + Join = ReadOnly?

 

 
Powered by phpBB® Forum Software