01.
Dim con
As
New SqlConnection(
"Server=localhost;Uid=sa;PASSWORD=123456;database=Earthenware;"
)
02.
03.
Dim sql
As
String =
""
04.
sql =
"UPDATE Customer SET CusName = '"
& TextBox2.Text &
"',CusSurname = '"
& TextBox3.Text &
"',CusAge = '"
& TextBox4.Text &
"',CusTel = '"
& TextBox5.Text &
"' WHERE Username= '"
& TextBox1.Text &
"';"
05.
06.
Dim cmd
As
New SqlCommand(sql, con)
07.
con.
Open
()
08.
09.
cmd.ExecuteNonQuery()
10.
con.
Close
()
11.
MsgBox(
"แก้ไขข้อมูลเรียบร้อย "
, 0,
" Complate Update "
)
12.
Response.Redirect(
"Course.aspx"
)