Source language: Translate to:

DB Error "hook" (Solved)

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

DB Error "hook" (Solved)

Postby ebear » Tue Nov 26, 2013 1:02 pm

Hello All,

Is there a possibility to have a publication "global hook" for DB errors??? By this I mean; when a DB Error comes up GoSub .....
I know that there would be a possibility to do this with a Timer, but when the check is needed say every second this would slow the app down.
Also it would be possible to check before every DB action but this makes the pub more complicated.

Or maybe ... something like GoSub if [dbpError] or any specified variable changes....

Thanks for your reactions,

Eric Beerhorst
Last edited by ebear on Tue Nov 26, 2013 4:20 pm, edited 1 time in total.
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: DB Error "hook"

Postby Gaev » Tue Nov 26, 2013 4:06 pm

Eric:

If you are refering to the Pro version of NeoBook's database plugin ... NeoBookDBpro ... take a look at the Help file info for dbpShowErrors ... where it says ...
Note: In addition to the normal error trapping provided by the [dbpError] variable, you can also create an error subroutine called DBPro_OnError to execute special actions whenever a database error occurs. For example, the following subroutine beeps annoyingly whenever a database error is detected:

: DBPro_OnError
PlayTone "440"
Return
... but you would still have to store some kind of information about each of the database commands (in another variable) ... before you invoke each command ... so you could tell (within this subroutine) what the offending command was.
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: DB Error "hook"

Postby ebear » Tue Nov 26, 2013 4:20 pm

Gaev,

Your complete right, this is something I over saw in the manual :oops: . The difference in the several procedures is to do with a simple "if else endif".

Thanks a lot for your reaction.

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron