473,320 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
Jul 22 '05 #1
1 3213
On 15 Jul 2004 10:53:45 -0700, Denzil <de*****@gmail.com> wrote:
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 news:comp.os.ms-windows.programmer.win32 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
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Pablo J Royo | last post by:
Hello: i have a function that reads a file as an argument and returns a reference to an object that contains some information obtained from the file: FData &ReadFile(string FilePath); But ,...
1
by: arvee | last post by:
Hi - I'm updating an Oracle table with an empty string and getting the error: An unhandled exception of type 'System.Exception' occurred in system.data.dll Additional information: Parameter...
13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
388
by: maniac | last post by:
Hey guys, I'm new here, just a simple question. I'm learning to Program in C, and I was recommended a book called, "Mastering C Pointers", just asking if any of you have read it, and if it's...
1
by: Steph | last post by:
I am trying to save a simple integer value in ViewState. I set the value in the Page_Load() event and retrieve it in the function Page_Unload() event. The value seems to be set correctly, but...
5
by: Dmitriy Lapshin [C# / .NET MVP] | last post by:
Hi all, I think the VB .NET compiler should at least issue a warning when a function does not return value. C# and C++ compilers treat this situation as an error and I believe this is the right...
6
by: marcwentink | last post by:
Dear Sirs, Dear Newsgroup, Imagine I have some function that only gives me an iterator to a vector, but not the vector itself. Unfortunately this vector can be empty and the iterator can point...
2
by: Jeff | last post by:
Hey I've bought the book "ASP.NET 2.0 website programming, Problem, Design, Solution" and some of its code examples is this code: protected static string ConvertNullToEmptyString(string input)...
21
by: Steven T. Hatton | last post by:
I'm trying to improve my formal understanding of C++. One significant part of that effort involves clarifying my understanding of the vocabulary used to describe the language. This is from the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.