Hi,

i have a problem to updating the record. it totally not works.
i am using ADO.net. and I set the CustNo as Pk and it is a auto increment no in SQL server.

heres the coding.

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click

Dim intResponse As Integer

If Me.cmCustomer.Position < 0 Then
intResponse = MessageBox.Show("Database is empty !", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning)
Exit Sub
Else
Try
Dim intRowSwapper As Integer = Me.cmCustomer.Position - 1
Me.cmCustomer.Position += intRowSwapper
Me.SqlDataAdapter1.Update(DataSet11)
MsgBox("Data Was SuccessFully Updated To The DataBase", MsgBoxStyle.Information, Me.Text)
Catch
End Try
LockTextBox()
BtnVisible2()
End If

Any help or example is appreciated!!
viv