12-02-17, 02:55 PM
السلام عليكم
يا شباب كيف اهئ خاصية ExecuteNonQuery
يا شباب كيف اهئ خاصية ExecuteNonQuery
كود :
Protected Sub SinUpU()
Dim cmd As New SqlCommand
Try
Dim conn As New SqlConnection()
conn.ConnectionString = "Data Source=a-pc\sqlexpress;Initial Catalog=DataKaleej;Integrated Security=True"
conn.Open()
cmd.CommandText = "update DataStudents$ set Password='" & TPass1.Text & "' where ID='" & " where ID='" + Tuser.Text + "'"
cmd.ExecuteNonQuery()
conn.Close()
Lb3.Text = "تم تغيير كلمة المرور بنجاح"
Lb3.ForeColor = Drawing.Color.Green
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub