RFX_Long "Oracle Null value" returned as junk integer [DoFieldExchange]

D

Denzil

Hi,

I am retrieving my DB [Oracle] values and setting them in the
MyRS::DoFieldExchange(CFieldExchange* pFX) function. One of these
records is a Long datatype and could be "Null" in the DB table.

The issue is when the DB value is retrieved it is fine for all
integers but for a "Null" value it returns a junk long value
[1246576928, always] and not a pre-defined value, say.

How do I ensure that for DB Null values it returns me a pre-defined
value? Is the only way out to have my own function that overrides the
MFC's RFX_Long(...) method where-in I handle this [as given in
dbrfx.cpp]? If yes, what should the condition be.

Any pointers will be appreciated.

TIA.

Cheerz,
Denzil
 
J

John Harrison

Hi,

I am retrieving my DB [Oracle] values and setting them in the
MyRS::DoFieldExchange(CFieldExchange* pFX) function. One of these
records is a Long datatype and could be "Null" in the DB table.

The issue is when the DB value is retrieved it is fine for all
integers but for a "Null" value it returns a junk long value
[1246576928, always] and not a pre-defined value, say.

How do I ensure that for DB Null values it returns me a pre-defined
value? Is the only way out to have my own function that overrides the
MFC's RFX_Long(...) method where-in I handle this [as given in
dbrfx.cpp]? If yes, what should the condition be.

Any pointers will be appreciated.

You need to ask in a different group. This group deals with standard
C++ questions only, not database programming. Guessing that you are in
fact programming for Windows why not try a Windows programming group such
as but maybe an Oracle group
would be better. In any case you are off topic here.

This groups welcome message may give a few more pointers,
http://www.slack.net/~shiva/welcome.txt

john
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top