How to insert a row with a column with an auto increase
i have a table with 2 column with this scheme:
ID | Name
ID = counter primary key
Name = text
i use this code to add new rows in the table.
But for the first item newRow("ID") it is a counter so it auto increase itself.
I have no to update. But if i don't i get error.
Dim newRow As DataRow
newRow = global.ds.Tables(0).NewRow
newRow("ID") = ??????
newRow("Nome") = txbNome.Text
global.ds.Tables(0).Rows.Add(newRow)
global.da.Update(global.ds, "myTable")
How can add a new row and leave the system database handle the ID column?