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

Discussion in 'C++' started by Denzil, Jul 15, 2004.

  1. Denzil

    Denzil Guest

    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
     
    Denzil, Jul 15, 2004
    #1
    1. Advertising

  2. On 15 Jul 2004 10:53:45 -0700, Denzil <> 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
     
    John Harrison, Jul 15, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Row
    Replies:
    0
    Views:
    314
    Peter Row
    Mar 3, 2004
  2. =?Utf-8?B?TEFDSA==?=

    Re: SmtpMail - Hotmail Junk e-mail

    =?Utf-8?B?TEFDSA==?=, Sep 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    465
    =?Utf-8?B?TEFDSA==?=
    Sep 16, 2004
  3. =?Utf-8?B?TEFDSA==?=

    Re: SmtpMail - Hotmail Junk e-mail

    =?Utf-8?B?TEFDSA==?=, Sep 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    498
    =?Utf-8?B?TEFDSA==?=
    Sep 24, 2004
  4. =?Utf-8?B?TEFDSA==?=

    RE: SmtpMail - Hotmail Junk e-mail

    =?Utf-8?B?TEFDSA==?=, Sep 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    581
    Matthew Schmidt
    Oct 6, 2004
  5. Jack Andersson
    Replies:
    6
    Views:
    432
    Jack Andersson
    Dec 6, 2004
Loading...

Share This Page