08-04-14, 02:01 AM
وما الحل
المشكله تكمن في هذه الجزئيه
هل بالإمكان تعديل الكود
المشكله تكمن في هذه الجزئيه
PHP كود :
Dim cmd As New OleDbCommand
ApoSYSconn.Close()
cmd.Connection = ApoSYSconn
ApoSYSconn.Open()
cmd.CommandText = "Select * from tblCustomers where CivilRegNum=@n"
cmd.Parameters.Add("@n", OleDbType.VarChar).Value = txtCRN.Text.ToString
Dim dr As OleDbDataReader = cmd.ExecuteReader()
If dr.HasRows = True Then
MessageBox.Show("هذا السجل موجود", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning)
txtCRN.Text = ""
txtCRN.Focus()
txtCRN.SelectionStart = 0
ApoSYSconn.Close()
