Article View: borland.public.cppbuilder.database.ado
Article #254Re: Null Values SQL2005 New to builder
From: Clayton Arends
Date: Wed, 14 Feb 2007 04:02
Date: Wed, 14 Feb 2007 04:02
19 lines
1623 bytes
1623 bytes
It depends on what you want to do with null data. If you want to treat
nulls as some value you can use VarToStr() or VarToStrDef(). Look them up
in the help for more info.
If you want to handle nulls differently then you can do something like this
whenever evaluating the field's value:
String strValue;
if (field->Value.IsNull())
// do some condition
else
strValue = field->Value; // or field->AsString;
Check out the help for TField and Variant for more info.
If you have a specific code example or a specific design question post it
and I'll try my best to help.
- Clayton
Technical Details
Message-ID:
<45d289d8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45d1b54c@newsgroups.borland.com> <45d250e9$1@newsgroups.borland.com> <45d2802f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,98e822ca4391f6f X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Clayton Arends" <nospam_claytonarends@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <45d1b54c@newsgroups.borland.com> <45d250e9$1@newsgroups.borland.com> <45d2802f$1@newsgroups.borland.com> Subject: Re: Null Values SQL2005 New to builder Date: Tue, 13 Feb 2007 20:02:52 -0800 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 71.93.4.222 Message-ID: <45d289d8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171425752 71.93.4.222 (13 Feb 2007 20:02:32 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail