17-11-18, 07:58 PM
كود :
If Conn.State = ConnectionState.Closed Then
Conn.Open()
End If
Dim cmd As New OleDb.OleDbCommand
cmd.Connection = Conn
cmd.CommandType = CommandType.Text
cmd.CommandText = "UPDATE info SET user_fornameinfo=@user_fornameinfo, genderinfo= @genderinfo WHERE user_idinfo= @user_idinfo"
cmd.Parameters.AddWithValue("@user_fornameinfo", TextBox2.Text.Trim)
cmd.Parameters.AddWithValue("@genderinfo", TextBox3.Text.Trim)
cmd.Parameters.AddWithValue("@user_idinfo", TextBox1.Text.Trim)
cmd.ExecuteScalar()
Conn.Close()