I have a login screen where the user enters their email. I then take the email and look up in a mySql table. If the email address is found it returns the user info in a datagrid. If it is not found it returns an error "user not found" message. Here is my code
put revQueryDatabase( theConnectionID, "select * from hospaccess.LogIn where eMail = '"&testUser&"'") into theCursor
if item 1 of theCursor = "revdberr" then
answer "User not found"
else
ConvertSQLCursorToArray theCursor, theDataGridArray
set the dgData of group "DataGrid3" to theDataGridArray
end if
It returns the data just fine when the user if found but when the user is not found it does nothing
Anyone have any ideas what I an doing wrong or has a better way I should be doing this?
Thank you
Chris
Database Query problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Database Query problem
Hi Chris,
well, that is correct behavior!
If there is no user with that email, there are also NO associated data for this (non) user!
What should be displayed in your opinion?
Best
Klaus
well, that is correct behavior!

If there is no user with that email, there are also NO associated data for this (non) user!
What should be displayed in your opinion?
Best
Klaus