G
Guest
Private Sub UpdateTblHistory()
Dim strSql As String
strSql = "Update tbl_History set SubscrID = @SubscrID Where ID = @ID"
da.UpdateCommand.CommandText = strSql
da.UpdateCommand.Parameters.Add("@SubscrID", SqlDbType.VarChar, 50,
"SubscrID")
da.UpdateCommand.Parameters.Add("@ID", SqlDbType.Int, 4, "ID")
da.Update(ds, "tbl_History")
End Su
----------------------------------------------------------------------------------
I am displaying a row from tbl_History in a datagridview. In the
datagridview_CellValueChanged event I call the update procedure above. The
code runs but tbl_History is not getting updated. Can anyone see why
tbl_History wont update?
Thanks,
Rich
Dim strSql As String
strSql = "Update tbl_History set SubscrID = @SubscrID Where ID = @ID"
da.UpdateCommand.CommandText = strSql
da.UpdateCommand.Parameters.Add("@SubscrID", SqlDbType.VarChar, 50,
"SubscrID")
da.UpdateCommand.Parameters.Add("@ID", SqlDbType.Int, 4, "ID")
da.Update(ds, "tbl_History")
End Su
----------------------------------------------------------------------------------
I am displaying a row from tbl_History in a datagridview. In the
datagridview_CellValueChanged event I call the update procedure above. The
code runs but tbl_History is not getting updated. Can anyone see why
tbl_History wont update?
Thanks,
Rich