Share via

BindingSource.AddNew does not AutoIncrement

Lance Summers 1 Reputation point
2021-03-16T19:52:59.027+00:00

VideoTableBindingSource.AddNew() does not auto increment I get an error stating that the ID Column may not be null I have the following defined in my Database: [Id] INT NOT NULL Primary Key Identity (1,1), clicking on ID shows Is Identity True in the properties window VideoTableBindingSource Datamember is set to VideoTable that contains ID as the primary key I even tried Me.VideoDBDataSet1.VideoTable.IdColumn.AutoIncrement = True before the AddNew() call but I get the same results Any help would be greatly appriciated, I am using Visual Studio 2017 VB. Lance

Developer technologies | Visual Basic for Applications

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.