I'm new to this & am havin a issue updated my data through a sqldataadapter.
I have no problem deleting & modifing my info
When I try to insert the information the user has provided & generate a primary key, I get the following error:
Cannot insert the value NULL into column 'id', table tlbOrder ; column does not allow nulls. INSERT fails.
Dim conn As SqlConnection = GetSQLConnection()
Dim sql As String = "Select * from tblOrder"
Dim sa2 As SqlDataAdapter = New SqlDataAdapter(sql, conn)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(sa2)
If ds.HasChanges Then
I thought this worked the same way as the insertcommand & my key was generated when I used this before to get my id.
Dim sql As String = "Select * from tblOrder where id = -1"
Please send me in the correct direction..