I have an application where I am asking the user to enter a signon and password. Then the customer file is read to see if they are valid. I do not need to retrieve any of the data - just verify that the record is on the database table. A couple of questions - How did I determine if the no records were found, after doing the select (see the code below)? Do I need to fill a dataset, and compare the fields (signon and password) to what was passed to the select statement? How do I access the dataset fields to do the compare? The only experience I have is with datasets is filling datagrids.
DataAdapter1.SelectCommand.CommandText = _
"SELECT CustomerID, UserPassword FROM Customers " & _
"WHERE CustomerID = mcustID & UserPassword = mPassword"
Try
DataAdapter1.SelectCommand.ExecuteNonQuery()
Catch exceptionparameter As Exception
MessageBox.Show(exceptionparameter.Message)
End Try
Im never hitting the Catch statement, no matter if the signon/password is valid or not.
Thanks, Donna
DataAdapter1.SelectCommand.CommandText = _
"SELECT CustomerID, UserPassword FROM Customers " & _
"WHERE CustomerID = mcustID & UserPassword = mPassword"
Try
DataAdapter1.SelectCommand.ExecuteNonQuery()
Catch exceptionparameter As Exception
MessageBox.Show(exceptionparameter.Message)
End Try
Im never hitting the Catch statement, no matter if the signon/password is valid or not.
Thanks, Donna