🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
3 messages
3 total messages Started by David Scheffel [Schlund+Partner ... Mon, 26 Jan 2004 12:21
TClientDataSet: "Field must have a value", but DefaultExpression is defined (= 'true')
#37
Author: David Scheffel [Schlund+Partner ...
Date: Mon, 26 Jan 2004 12:21
17 lines
1631 bytes
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
Re: TClientDataSet: "Field must have a value", but DefaultExpression is defined (= 'true')
#39
Author: jpi
Date: Sat, 31 Jan 2004 22:24
33 lines
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
>
>
Re: TClientDataSet: "Field must have a value", but DefaultExpression is defined (= 'true')
#40
Author: 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
> >
> >
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads