 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
TerryC Guest
|
Posted: Tue Dec 20, 2005 9:32 pm Post subject: Defaults in IB + IBX app |
|
|
I have what I thought was a simple database app. I can't seem
to get the BCB app to use the defaults set on the fields in IB.
For example, I have a field using a domain with a default of 'A'
and a NOT NULL, but when I insert a record with a TDBGrid and
IBX, it throws an EInterBaseError: 'validation error for column
XXX, value **** null ****'
Why is it NULL? The field has a default on it. The default
value is in the same domain definition as the NOT NULL
requirement, so why does IBX see the NOT NULL, but not the
default?
Thanks,
Terry |
|
| Back to top |
|
 |
Antonio Felix Guest
|
Posted: Tue Dec 20, 2005 11:00 pm Post subject: Re: Defaults in IB + IBX app |
|
|
"TerryC" <terrycSPAMBITES (AT) sweetwaterhsa (DOT) SPAMDIEDIEDIEcom> wrote:
| Quote: |
I have what I thought was a simple database app. I can't seem
to get the BCB app to use the defaults set on the fields in IB.
For example, I have a field using a domain with a default of 'A'
and a NOT NULL, but when I insert a record with a TDBGrid and
IBX, it throws an EInterBaseError: 'validation error for column
XXX, value **** null ****'
Why is it NULL? The field has a default on it. The default
value is in the same domain definition as the NOT NULL
requirement, so why does IBX see the NOT NULL, but not the
default?
Thanks,
Terry
|
Hi Terry,
It's because the underlying SQL sends the Fields to the Server
with Null Values.
In order to get the field defaults applied on the Server Side, the fields must not be included in the SQL command.
PS: There's several reasons to do not use the DBComponents when
dealing with SQL Server's.
HTH
Antonio |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|