Article View: borland.public.cppbuilder.database.multi-tier
Article #39Re: TClientDataSet: "Field must have a value", but DefaultExpression is defined (= 'true')
From: jpi
Date: Sat, 31 Jan 2004 22:24
Date: Sat, 31 Jan 2004 22:24
33 lines
2398 bytes
2398 bytes
Hi David,
Did you tried to check the value of the record in the BeforePost, or maybe
in the BeforeInsert event of your dataset? You can still set the value to a
valid one in those event, thus preventing the posting or the insertion of an
invalid value. You will probably have to check those events anyway, I was
using a dataset with an hidden field that was a autoinc key, and I did have
to set it to a proper value (I did not want at that time to alter the
definition of the field setting it to not required)...
jpi
"David Scheffel [Schlund+Partner AG]" <noreply@schlund.de> wrote in message
news:4015065e@newsgroups.borland.com...
> Hello,
>
> one of our customers complains about an exception ("Field must have a
> value") that is thrown when he tries to insert an record. I really wonder
> about this exception because the DefaultExpression of the corresponding
> field is set (= 'true'). We use the TClientDataSet as standalone desktop
> database component - please dont't ask why!
>
> Does the TClientDataSet handle boolean constants language specific (e.g.
> 'wahr' {german} instead of 'true') ?
>
> Is it recommend to use an constant integer value (1) instead of 'true' in
> the DefaultExpression of an boolean field?
>
> regards
>
> David Scheffel
>
>
Technical Details
Message-ID:
<401c2b1a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4015065e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,5062174beeb13d3 X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2004-01-31 14:39:45 PST From: "jpi" <jpi67@altern.org> Newsgroups: borland.public.cppbuilder.database.multi-tier References: <4015065e@newsgroups.borland.com> Subject: Re: TClientDataSet: "Field must have a value", but DefaultExpression is defined (= 'true') Date: Sat, 31 Jan 2004 17:24:19 -0500 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 64.223.151.171 Message-ID: <401c2b1a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1075587866 64.223.151.171 (31 Jan 2004 14:24:26 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail