How to "force" wwSql to display SQL Errors (either messagebox, wait window or print on screen) ?
The code below is generating SQL Error (from Ms SQL Server not vfp dbc: == is fine with vfp) but on the web it will just display "Invalid username or password". Is there any "debug" flag I can set in WWC so the errors will showup in the browser (at least during development stage) ?
If !This.LoadBase("Email == ?lcEmail AND Password == ?lcPassword")
This.SetError("Invalid username or password ?")
Return .F.
Endif
Not directly - you're managing the error message, so you can put different error information into the message as needed when you call SetError()
.
In your case look at THIS.cErrorMsg
or THIS.oSql.cErrorMsg
and this.oSql.cLastSql
(if you are using SQL).
+++ Rick ---
Thanks Rick! I see it now - This.LoadBase() in wwBusiness class will actually set the error... I was just overriding it with this line: This.SetError("Invalid username or password ?"). What I should do is to test if there is a meesage set there already...
Thanks, Adam