T
Tony M
Shouldn't the ExecuteNonQuery be TRUE if it finds a record and FALSE is not?
I get FALSE all the time and I seeded the database with the email address.
I just want to check if record exist before moving on.
If this doesn't work I guess I could load a datatable and check to see if
rows > 0.
Dim cnString As OleDbConnection
cnString = New OleDbConnection("Provider=MicroSoft.Jet.OLEDB.4.0; Data
source = " & Server.MapPath("Someplace.mdb"))
Dim CheckCus As New OleDbCommand("SELECT * from Cus where EMailAddress =" &
QM & Trim(txtEMail.Text) & QM, cnString)
CheckCus.Connection.Open()
If CheckCus.ExecuteNonQuery() Then
txtFirstName.Text = "Yes"
Else
txtFirstName.Text = "No " & Now
End If
CheckCus.Connection.Close()
Thanks
Tony
I get FALSE all the time and I seeded the database with the email address.
I just want to check if record exist before moving on.
If this doesn't work I guess I could load a datatable and check to see if
rows > 0.
Dim cnString As OleDbConnection
cnString = New OleDbConnection("Provider=MicroSoft.Jet.OLEDB.4.0; Data
source = " & Server.MapPath("Someplace.mdb"))
Dim CheckCus As New OleDbCommand("SELECT * from Cus where EMailAddress =" &
QM & Trim(txtEMail.Text) & QM, cnString)
CheckCus.Connection.Open()
If CheckCus.ExecuteNonQuery() Then
txtFirstName.Text = "Yes"
Else
txtFirstName.Text = "No " & Now
End If
CheckCus.Connection.Close()
Thanks
Tony