Autor Beitrag
kirkie
Hält's aus hier
Beiträge: 8



BeitragVerfasst: Fr 13.01.06 11:36 
I have a problem with inserting new values in DBGrid connected with TSQLDataSet. The source table has an Identity autoincrement field I need to read. But when I try insert a new record, there occures an error - my identity field is requeired athough I set required to false.

If I don't include this autoincement field into SELECT statement, I can insert new records without problem. Do you know anybody how to deal with it?
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Fr 13.01.06 12:47 
Well Im definitly not a DB expert but I had similar problems in past.
If I understand you right then one column of the table has autoinc/plausibility check trigger set. So IMHO your statement has to include a valid value for the field even if it will be replaced by the autoincrement.

For further informations have a look at
aam.ugpl.de/
www.sqlzoo.net/
both links are multilang of course ;-)