CRecordset class & Visual Foxpro ODBC driver 
Author Message
 CRecordset class & Visual Foxpro ODBC driver

I have a situation that requires access to a Visual Foxpro table using some
legacy code that accesses the data directly and does not support NULLs in
the table. In my new code I am attempting to access the same table via ODBC
using the CRecordset class. The problem is that you can not update a record
because CRecordset wants to assign NULL to empty records even if the ODBC
driver has the SET NULL OFF and the table does not support NULLs.

I have tried writing the code in the to cycle through each column in the
recordset and calling SetFieldNull(pvField, FALSE) to set the flag to
Non-Null but the default RFX_*() functions set fields to NULL. It seems as
though there is no way to keep CRecordset from assigning the NULL to a
field. So the Update() method throws an exception that informs me "(Field
Name) does not accept NULL values."

Does anyone know how to support ODBC datasources that do not support NULL
values using CRecordset?

Thanks for any help.

--
Tory Bjorklund
Simplicity Software, Inc
Remove NOSPAM and its mirror from my email address to reply.



Sun, 20 Oct 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Visual FoxPro ODBC Driver for Alpha

2. ODBC Driver for Visual Foxpro

3. Visual FoxPro ISAM Driver for DAO

4. Bug in Visual FoxPro driver

5. Newbie Fast ODBC updates to Visual FoxPro ?

6. Accessing Visual FoxPro 5 Via ODBC

7. Visual FoxPro 3.0 ODBC connection

8. Visual FoxPro 3.0 and ODBC

9. ODBC: Update() on visual FoxPro table limits?

10. Oracle ODBC driver instead of Microsofts ODBC Oracle driver

11. Use ODBC with Visual FoxPro

12. Accessing Visual FoxPro 5 Via ODBC

 

 
Powered by phpBB® Forum Software