Page 1 of 1

"dbpShowErrors" not working

PostPosted: Tue Apr 09, 2013 8:41 am
by Eduardo Volpi
dbpShowErrors "No"
dbpFind "db" "Amigos" "NomeCompleto;CidadeResidencia;EstadoResidencia;Cargo;Categoria" "[FindFor]" "ExactMatch=No;CaseSensitive=No"
If "[dbpError]" ">" ""
AlertBox "[PubTitle]" "Nenhum registro encontrado"
EndIf
dbpShowErrors "Yes"


Using the simple code above is not working here. The neobookdbpro's error message will pop up anyway despite I turn off the dbpShowErrors.

Re: "dbpShowErrors" not working

PostPosted: Tue Apr 09, 2013 8:49 am
by Gaev
Eduardo Volpi:

I haven't verified this ... but try using ...
Code: Select all
dbpShowErrors "False"
.. and
dbpShowErrors "True"

... which is what the NeoBook ShowErrors command uses.

Re: "dbpShowErrors" not working

PostPosted: Tue Apr 09, 2013 9:29 am
by Eduardo Volpi
Gaev wrote:Eduardo Volpi:

I haven't verified this ... but try using ...
Code: Select all
dbpShowErrors "False"
.. and
dbpShowErrors "True"

... which is what the NeoBook ShowErrors command uses.


Hi Gaev,

I tried the way you suggested but still didn't work.

Thanks

Re: "dbpShowErrors" not working

PostPosted: Tue Apr 09, 2013 11:16 am
by Neosoft Support
I don't have the same database that you're using, but I tried the following code with the sample AddressBook pub included with DBPro:

InputBox "Find" "Find What?" "[Result]"
dbpShowErrors "No"
dbpFind "AddrBook" "Contacts" "LastName;FirstName;Company" "[Result]" "ExactMatch=No;CaseSensitive=No"
If "[dbpError]" ">" ""
AlertBox "[PubTitle]" "Nenhum registro encontrado"
EndIf
dbpShowErrors "Yes"

With show errors turned off, I only see the custom alertbox message when the search fails, so it appears to be working correctly.

Make sure that your table's on change subroutine (or something else) isn't turning the error display back on.

Re: "dbpShowErrors" not working

PostPosted: Tue Apr 09, 2013 12:09 pm
by Eduardo Volpi
Neosoft Support wrote:Make sure that your table's on change subroutine (or something else) isn't turning the error display back on.


Hi Dave,

I don't have table's on change subrotine but looking at my code I discovered a dbpShowErrors "Yes" right after my "dbpOpenAccessDatabase" command.
Removing it fixed the problem although I don't understand why, since before my "Find code" I changed the dbpShowErrors to "No".

Thanks for helping

Re: "dbpShowErrors" not working

PostPosted: Wed Apr 10, 2013 11:33 am
by Neosoft Support
Setting dbpShowErrors increments or deincrements a counter. For every dbpShowErrors = True the counter in incremented by one. For every dbpShowErrors = False the counter is deincremented by one. Errors are displayed when the counter is > 0.

Re: "dbpShowErrors" not working

PostPosted: Wed Apr 10, 2013 12:15 pm
by Eduardo Volpi
Understood. Thank you.