ODBC CRecordSet Bulk Fetching 
Author Message
 ODBC CRecordSet Bulk Fetching

Hope someone can help,

I've set up a CRecordSet derived class for DynamicBulkSets.
When ever I run the code I can connect to the ODBC database (DSN),
fetch the first 25 (default row fetch) and access all fields perfect.

When I call the CRecordSet based MoveNext(), which should get the next
25 records, the CRecordSet now has the next 25 records but the second
field in the SQL Select statement is not initialised i.e. whenever I
access it (second time through) an Access Violation occurs.
The rest of the fields in the Select statement are fine. The data in
the database is fine.

I have 25,000 records to go throught, so cannot set the bulkfetch to
retrieve all at once.

Any help would be appreciated.

Thanks...

Darren.



Sat, 18 May 2002 03:00:00 GMT  
 ODBC CRecordSet Bulk Fetching

You can check the size of your field use:
if((record->fieldLen+j)==SQL_NULL_DATA)
{nodata}
else
{data}
If this will not do give me some simplified code and I can have a look at
it.
Please inform me if this is a solution to your problem.

Taco Dankers

Quote:

> Hope someone can help,

> I've set up a CRecordSet derived class for DynamicBulkSets.
> When ever I run the code I can connect to the ODBC database (DSN),
> fetch the first 25 (default row fetch) and access all fields perfect.

> When I call the CRecordSet based MoveNext(), which should get the next
> 25 records, the CRecordSet now has the next 25 records but the second
> field in the SQL Select statement is not initialised i.e. whenever I
> access it (second time through) an Access Violation occurs.
> The rest of the fields in the Select statement are fine. The data in
> the database is fine.

> I have 25,000 records to go throught, so cannot set the bulkfetch to
> retrieve all at once.

> Any help would be appreciated.

> Thanks...

> Darren.



Sat, 18 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CRecordset bulk row fetch broken?

2. CRecordset Bulk Row Fetching

3. Using Bulk record fetching with CRecordset

4. Problem Fetching Records in Bulk using MFC/ODBC/SQL Server

5. Problem Fetching Records in Bulk using MFC/ODBC/SQL Server

6. Problem Fetching Records in Bulk using MFC/ODBC/SQL Server

7. Bulk Fetching and AddNew/Edit/Delete/Update

8. CDaoRecordset and Bulk Row Fetching

9. Bulk Row Fetching in CDaoRecordset??

10. Bulk fetch optimality

11. Add/Delete while using Bulk fetch

12. ADO: bulk fetch

 

 
Powered by phpBB® Forum Software