Automatic insert of " all nulls " in db grid

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Automatic insert of " all nulls " in db grid

Post by upscene » Mon 15 Mar 2010 08:44

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

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 16 Mar 2010 13:45

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

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Post by upscene » Tue 16 Mar 2010 15:19

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?

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 22 Mar 2010 12:22

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.

Post Reply