BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Defaults in IB + IBX app

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (InterBase Express)
View previous topic :: View next topic  
Author Message
TerryC
Guest





PostPosted: Tue Dec 20, 2005 9:32 pm    Post subject: Defaults in IB + IBX app Reply with 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
Back to top
Antonio Felix
Guest





PostPosted: Tue Dec 20, 2005 11:00 pm    Post subject: Re: Defaults in IB + IBX app Reply with quote



"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (InterBase Express) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.