Source language: Translate to:

"dbpShowErrors" not working

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

"dbpShowErrors" not working

Postby Eduardo Volpi » Tue Apr 09, 2013 8:41 am

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.
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Re: "dbpShowErrors" not working

Postby Gaev » Tue Apr 09, 2013 8:49 am

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.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: "dbpShowErrors" not working

Postby Eduardo Volpi » Tue Apr 09, 2013 9:29 am

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
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Re: "dbpShowErrors" not working

Postby Neosoft Support » Tue Apr 09, 2013 11:16 am

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: "dbpShowErrors" not working

Postby Eduardo Volpi » Tue Apr 09, 2013 12:09 pm

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
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Re: "dbpShowErrors" not working

Postby Neosoft Support » Wed Apr 10, 2013 11:33 am

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: "dbpShowErrors" not working

Postby Eduardo Volpi » Wed Apr 10, 2013 12:15 pm

Understood. Thank you.
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron