Web Connection
wwSQL debug mode
Gravatar is a globally recognized avatar based on your email address. wwSQL debug mode
  Adam W
  All
  Mar 3, 2017 @ 01:14pm

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
Gravatar is a globally recognized avatar based on your email address. re: wwSQL debug mode
  Rick Strahl
  Adam W
  Mar 3, 2017 @ 01:58pm

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 ---

Gravatar is a globally recognized avatar based on your email address. re: wwSQL debug mode
  Adam W
  Rick Strahl
  Mar 3, 2017 @ 02:05pm

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

© 1996-2024