T
Tony WONG
The form call a selected record by "sqlDataReader"
then fill in textboxes by (TxtPhone.Text = reader("Dest_Addr").ToString)
i made the amendments to the textboxes and click Update button
strUpdate = "Update table set col1=@TxtPhone where ID='" & ID & "'"
cmdUpdate = New SqlCommand(strUpdate, myConnection)
MsgBox(TxtPhone.Text)
cmdUpdate.Parameters.AddWithValue("@TxtPhone", "852" +
TxtPhone.Text)
however the textbox return to old values
the record can be updated by erasing TxtPhone.Text
cmdUpdate.Parameters.AddWithValue("@TxtPhone", "852111111")
then the problem should be the textbox(TxtPhone.Text)
i try to change to SqlDataAdapter, dataset but still fail.
any ideas? Thanks a lot.
tony
then fill in textboxes by (TxtPhone.Text = reader("Dest_Addr").ToString)
i made the amendments to the textboxes and click Update button
strUpdate = "Update table set col1=@TxtPhone where ID='" & ID & "'"
cmdUpdate = New SqlCommand(strUpdate, myConnection)
MsgBox(TxtPhone.Text)
cmdUpdate.Parameters.AddWithValue("@TxtPhone", "852" +
TxtPhone.Text)
however the textbox return to old values
the record can be updated by erasing TxtPhone.Text
cmdUpdate.Parameters.AddWithValue("@TxtPhone", "852111111")
then the problem should be the textbox(TxtPhone.Text)
i try to change to SqlDataAdapter, dataset but still fail.
any ideas? Thanks a lot.
tony