Page 1 of 1

Automatic insert of " all nulls " in db grid

Posted: Mon 15 Mar 2010 08:44
by upscene
Hi,

When I have connected a dataset to a DBGrid of some sort, trying to insert all "nulls" seems to fail with a statement generated:

Code: Select all

INSERT INTO  ()
VALUES ()
I guess this is because none of the columns are edited (filled by the user) and you don't want to explicitly set NULL.

How can I work around this? Currently, an SQL error is raised, can this be handled better by the components?

With regards,

Martijn Tonies
Upscene Productions

Posted: Tue 16 Mar 2010 13:45
by bork
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next IBDAC build.

Posted: Tue 16 Mar 2010 15:19
by upscene
bork wrote:Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next IBDAC build.
So, will it be possible to enter all NULL? Are column defaults returned? Or is the row ignored and the edit state cancelled?

Posted: Mon 22 Mar 2010 12:22
by bork
Yes, now it will be possible to insert all NULL values to the record. If you want columns to get default values you should set the "Options.DefaultValues" property to True.