NEED HELP with SQL query

electronik54

Member
Licensed User
Longtime User
:sign0085::sign0104: :sign0144: :sign0085::sign0104:

SQL3.BeginTransaction
Try
Cursor10 = SQL3.ExecQuery("Select * FROM users WHERE name='"&Ul_name.Text&"' AND password='"&Tlogin_Pass.Text&"' ")
loginuser
Catch
ToastMessageShow("Wrong User name or Password",True)
Ul_name.Color=Colors.red
Tlogin_Pass.Color=Colors.red
End Try

its supposed to check if user name and password are in the database or no. but instead it wont return any errors in case of wrong user name and\or password. i guess something is wrong with my SQL query.
:sign0144:
 

rboeck

Well-Known Member
Licensed User
Longtime User
It is no error if you dont find something in your database. You have to check the cursor object - you could get cursor10.RowCount with zero or one rows. Then you can check what's in your database rows. You con look at DBUtils - ExecuteMemoryTable subroutine.
Greetings
Reinhard
 

electronik54

Member
Licensed User
Longtime User
It is no error if you dont find something in your database. You have to check the cursor object - you could get cursor10.RowCount with zero or one rows. Then you can check what's in your database rows. You con look at DBUtils - ExecuteMemoryTable subroutine.
Greetings
Reinhard

Thanks!!
 
Top