🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #40

Re: TClientDataSet: "Field must have a value", but DefaultExpression is defined (= 'true')

#40
From: David Scheffel [Schlund+Partner ...
Date: Tue, 03 Feb 2004 12:51
51 lines
2798 bytes
Hi jpi,

I've decided to set the (default)value in the OnNewRecord event, preventing
that language specific constants could affect our programs behavior. If the
problem will appear anyway, I'll try it as you've recommended.

David

"jpi" <jpi67@altern.org> schrieb im Newsbeitrag
news:401c2b1a@newsgroups.borland.com...
> 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: <401f993f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4015065e@newsgroups.borland.com> <401c2b1a@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-02-03 05:09:48 PST
From: "David Scheffel [Schlund+Partner AG]" <noreply@schlund.de>
Newsgroups: borland.public.cppbuilder.database.multi-tier
References: <4015065e@newsgroups.borland.com> <401c2b1a@newsgroups.borland.com>
Subject: Re: TClientDataSet: "Field must have a value", but DefaultExpression is defined (= 'true')
Date: Tue, 3 Feb 2004 13:51:05 +0100
Lines: 53
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: 212.227.35.73
Message-ID: <401f993f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075812671 212.227.35.73 (3 Feb 2004 04:51:11 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail