I have a DatagridView with 10-columns and Allow user to add new row is True.
But the problem is when the user entering the data's in new row's from the last row, when they
entered the data in 4th cell, they like to save the data.
But it's not saving, the uncompleted last row.
Iam using the following for save.
-----------------------------------------------------------
Dim DAD31 As SqlDataAdapter,DS31 As New DataSet,DTB31 As New DataTable
Dim Save_4 As String = "insert into itemmst (itm_description) values (&itm_description)"
DAD31.InsertCommand = New SqlCommand(Save_4, con)
con.Open()
Dim Trans As SqlTransaction
Trans = con.BeginTransaction
DAD31.InsertCommand.Transaction = Trans
Try
DAD31.Update(DS31.Tables(0))
Trans.Commit()
Catch ex As Exception
If Not Trans Is Nothing Then
Trans.Rollback()
End If
MsgBox(ex.Message)
End Try
con.Close()
----------------------------------------------------------
THANK YOU
But the problem is when the user entering the data's in new row's from the last row, when they
entered the data in 4th cell, they like to save the data.
But it's not saving, the uncompleted last row.
Iam using the following for save.
-----------------------------------------------------------
Dim DAD31 As SqlDataAdapter,DS31 As New DataSet,DTB31 As New DataTable
Dim Save_4 As String = "insert into itemmst (itm_description) values (&itm_description)"
DAD31.InsertCommand = New SqlCommand(Save_4, con)
con.Open()
Dim Trans As SqlTransaction
Trans = con.BeginTransaction
DAD31.InsertCommand.Transaction = Trans
Try
DAD31.Update(DS31.Tables(0))
Trans.Commit()
Catch ex As Exception
If Not Trans Is Nothing Then
Trans.Rollback()
End If
MsgBox(ex.Message)
End Try
con.Close()
----------------------------------------------------------
THANK YOU