How to get the DEFAULT value of a column from metadata?

How to get the DEFAULT value of a column from metadata?

Postby u.masotti » Thu 22 Apr 2010 08:33

In my application, actually Firebird 2.1 and Fb 2.5 RC i8n test, I have some fields that are defined NOT NULL and on a "DEFAULT 0" user defined domain.

I'm using query and update objects,through a TCustomClientdataset derived component.
When I add record to a query, at POST the fields are defined as Required because of the "NOT NULL" definition but I'm not able to get that they are also DEFAULTed so to keep appropriate action in i.e. BeforePost event.
In BDE a required field is defined as NOT NULL and NOT DEFAULTed (AFAIU my Delphi 7 vcl sources) and that seems right, because post don't need to check for a field NOT NULL that has a default when there are update objects to keep track of server errors in ApplyUpdates.
Perhaps the model under ClientDataSet doesn't support that?
Anyway I need to know how recognize when a field has a default defined (and eventually) get that value to assign to the params in the insert query of the update object.
Are there any solution or hint?
Many thanks in advance.

Mimmo.
u.masotti
 
Posts: 3
Joined: Sat 20 Feb 2010 12:04

Postby Dimon » Thu 22 Apr 2010 11:59

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next DbxIda build.
Dimon
Devart Team
 
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Postby u.masotti » Thu 22 Apr 2010 14:53

Dimon wrote:Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next DbxIda build.

Mmmmh.. Ok. :)
Please note that I've already changed metadata queries to reflect my situation and rebuilt library (dbx*.dll).
Do you mean that in actual version of the driver it's impossible to pick that information?
And related to this, are there any chance to download and test snapshot build?
Thanks.
u.masotti
 
Posts: 3
Joined: Sat 20 Feb 2010 12:04

Postby Dimon » Fri 23 Apr 2010 06:29

Please contact us by dmitryg*devart*com email and specify your developer license number.
Dimon
Devart Team
 
Posts: 2885
Joined: Mon 05 Mar 2007 16:32


Return to dbExpress driver for InterBase & Firebird