Legiadinh1001
New member
- Joined
- Feb 20, 2008
- Messages
- 2
- Programming Experience
- 3-5
This is my code:
Dim tbL As New DataTable
Dim Adap As New SqlClient.SqlDataAdapter("Select * from DM_HANGHOA" ,CnnStr)
Dim cmd As New SqlClient.SqlCommandBuilder(Adap)
Adap.UpdateCommand = cmd.GetUpdateCommand
Adap.InsertCommand = cmd.GetInsertCommand
Adap.DeleteCommand = cmd.GetDeleteCommand
Adap.Fill(tbL)
Dim I As Integer
For I = 0 To tbL.Rows.Count - 1
tbL.Rows(I)("TEN") = "DLKJFDLKJF"
Next
tbL.AcceptChanges()
Adap.Update(tbL)
After Adap.Update, table DM_HANGHOA not update, please, help me!
Dim tbL As New DataTable
Dim Adap As New SqlClient.SqlDataAdapter("Select * from DM_HANGHOA" ,CnnStr)
Dim cmd As New SqlClient.SqlCommandBuilder(Adap)
Adap.UpdateCommand = cmd.GetUpdateCommand
Adap.InsertCommand = cmd.GetInsertCommand
Adap.DeleteCommand = cmd.GetDeleteCommand
Adap.Fill(tbL)
Dim I As Integer
For I = 0 To tbL.Rows.Count - 1
tbL.Rows(I)("TEN") = "DLKJFDLKJF"
Next
tbL.AcceptChanges()
Adap.Update(tbL)
After Adap.Update, table DM_HANGHOA not update, please, help me!