Bug #17121 | System.Data.NoNullAllowedException when adding row with auto_increment field | ||
---|---|---|---|
Submitted: | 4 Feb 2006 16:00 | Modified: | 1 Sep 2009 14:14 |
Reporter: | Jan Bouwhuis | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / NET | Severity: | S4 (Feature request) |
Version: | 1.07 | OS: | Windows (Windows or Linux/Mono 1.1.13) |
Assigned to: | CPU Architecture: | Any |
[4 Feb 2006 16:00]
Jan Bouwhuis
[7 Feb 2006 9:59]
Jan Bouwhuis
Found a work-a-round by passing a value of 0 to the auto_incremented instead of System.DBNull.Value. Tested both on Windows and Mono. This seems te be working correctly.
[1 Sep 2009 14:14]
Tonci Grgin
This is actually not a bug. Please check MS docs on autoincrement and adjust proper properties such as: (dt.Columns["Col1"]).AutoIncrement = true; .AutoIncrementSeed = -1; .AutoIncrementStep = -1;