Disable Advantage error message dialogs
- Massimo Linossi
- Posts: 474
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Disable Advantage error message dialogs
Hi to all.
Is there a way to disable the Advantage Database error message dialogs ?
Sometimes a batch procedure that runs during the night is giving some errors, and ADS opens a dialog with a button that
must be pressed otherwise the program stays stopped.
Another way could be to trap the ADS errors but I can't find documentation about this.
Thanks a lot
Massimo
Is there a way to disable the Advantage Database error message dialogs ?
Sometimes a batch procedure that runs during the night is giving some errors, and ADS opens a dialog with a button that
must be pressed otherwise the program stays stopped.
Another way could be to trap the ADS errors but I can't find documentation about this.
Thanks a lot
Massimo
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Disable Advantage error message dialogs
Massimo
You can always surround your execution statements with
Try
Catch
End Try
Rick Lipkin
You can always surround your execution statements with
Try
Catch
End Try
Code: Select all
lOk := .t.
Try
execute something // if fails .. the error is routed to the Catch statement and you can recover from there
Catch
lOk := .f.
End Try
If lOk = .f. // use this to recover and move on
Select Database
Skip
loop
Endif
- Massimo Linossi
- Posts: 474
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Re: Disable Advantage error message dialogs
Hi Rick.
I've tried your suggestion but the problem is still here.
The ADS popup appears when there is an error and the program stops its execution until you press the OK button.
Even if you close the statement in the TRY-CATCH-END commands.
It's really strange that is not possible to trap the ADS errors inside your program.
Thanks a lot for your time
Massimo
I've tried your suggestion but the problem is still here.
The ADS popup appears when there is an error and the program stops its execution until you press the OK button.
Even if you close the statement in the TRY-CATCH-END commands.
It's really strange that is not possible to trap the ADS errors inside your program.
Thanks a lot for your time
Massimo
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Disable Advantage error message dialogs
If there is a way, you have to search for it through the ADS parameters.
EMG
EMG
- Massimo Linossi
- Posts: 474
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Re: Disable Advantage error message dialogs
I'm looking for these parameters in some documentation but till now I didn't find something useful.
I go on with some research on other forums too.
Thanks a lot.
Massimo
I go on with some research on other forums too.
Thanks a lot.
Massimo
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Disable Advantage error message dialogs
Massimo
Reinaldo Crespo is the ADS expert .. hopefully he will chime in here to give you a hand .. if not .. you can start a new thread to his attention.
Rick Lipkin
Reinaldo Crespo is the ADS expert .. hopefully he will chime in here to give you a hand .. if not .. you can start a new thread to his attention.
Rick Lipkin
- Giovany Vecchi
- Posts: 129
- Joined: Mon Jun 05, 2006 9:39 pm
- Location: Brasil
Re: Disable Advantage error message dialogs
If using Remote Ads, open the Advantage configuration Utility, select CONFIGURATION UTILITY > MISC SETTINGS tab and check SUPPESS MESSAGE BOXES
- Massimo Linossi
- Posts: 474
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Re: Disable Advantage error message dialogs
Hi.
I've tried your suggestion but the error messages inside a procedure are still there.
Maybe the messages that are disabled with that check are others.
It's a nightmare.
Thanks a lot
massimo
I've tried your suggestion but the error messages inside a procedure are still there.
Maybe the messages that are disabled with that check are others.
It's a nightmare.
Thanks a lot
massimo
- Massimo Linossi
- Posts: 474
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Re: Disable Advantage error message dialogs
Hello again.
Reading inside the help of ADS, i found a please where is written that is possible to use a
custom error procedure inside your program, where Advantage is sending the error messages.
Someone has ever tried to make something like this ?
Thanks a lot
Massimo
Reading inside the help of ADS, i found a please where is written that is possible to use a
custom error procedure inside your program, where Advantage is sending the error messages.
Someone has ever tried to make something like this ?
Thanks a lot
Massimo
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: Disable Advantage error message dialogs
Hi,
first of all: there are a picture of this error please?
second: I don´t know any ADS api that disable the errors, where you find it and what is the ADS version?
regards.
first of all: there are a picture of this error please?
second: I don´t know any ADS api that disable the errors, where you find it and what is the ADS version?
regards.
- Massimo Linossi
- Posts: 474
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Re: Disable Advantage error message dialogs
Hi.
I wish to disable any kind of errors, because it something happen during a bath processing
running in the night, the program stopped and the open tables are blocking the server automatic
backups.
I've seen this inside the help of the ADS 11.10
In most cases, run-time errors can be detected by your code. When an error is encountered, an error message is generated and passed to an error object in your CA-Visual Objects error handler or a screen will pop up with an error code.
If a run-time error occurs, identify the error class and specific message. Advantage will use the instance variable, "OSCode", in the CA-Visual Objects error object. You may see error codes in the OSCode field. Advantage error codes are listed in the Advantage Error Guide Help File.
CAUTION When opening a table, the error object is no longer populated if an error occurs. This is because the error object was triggering the default error handler to be called even if the error was handled within the application. This was implemented to provide the ability to control error handling without the resulting default message box being displayed.
The example code below can be used for determining if an error occurred while attempting to open a table:
LOCAL oDB AS DBServer
LOCAL dwError AS DWORD
LOCAL pacError AS PSZ
LOCAL wLen AS WORD
LOCAL lReturn AS LONGINT
pacError := MemAlloc( 200 )
wLen := 200
RDDSETDEFAULT("AXDBFCDX")
oDB := DBServer {"d:\demo10.dbf", DBShared,, "AXDBFCDX"}
lReturn := AdsGetLastError( @dwError, pacError, @wLen)
IF lReturn != AE_SUCCESS
ErrorBox{ , "Failed to get last error" }:Show()
ELSEIF dwError != AE_SUCCESS
ErrorBox{ , " Advantage error = " + pacError }:Show()
ENDIF
I wish to disable any kind of errors, because it something happen during a bath processing
running in the night, the program stopped and the open tables are blocking the server automatic
backups.
I've seen this inside the help of the ADS 11.10
In most cases, run-time errors can be detected by your code. When an error is encountered, an error message is generated and passed to an error object in your CA-Visual Objects error handler or a screen will pop up with an error code.
If a run-time error occurs, identify the error class and specific message. Advantage will use the instance variable, "OSCode", in the CA-Visual Objects error object. You may see error codes in the OSCode field. Advantage error codes are listed in the Advantage Error Guide Help File.
CAUTION When opening a table, the error object is no longer populated if an error occurs. This is because the error object was triggering the default error handler to be called even if the error was handled within the application. This was implemented to provide the ability to control error handling without the resulting default message box being displayed.
The example code below can be used for determining if an error occurred while attempting to open a table:
LOCAL oDB AS DBServer
LOCAL dwError AS DWORD
LOCAL pacError AS PSZ
LOCAL wLen AS WORD
LOCAL lReturn AS LONGINT
pacError := MemAlloc( 200 )
wLen := 200
RDDSETDEFAULT("AXDBFCDX")
oDB := DBServer {"d:\demo10.dbf", DBShared,, "AXDBFCDX"}
lReturn := AdsGetLastError( @dwError, pacError, @wLen)
IF lReturn != AE_SUCCESS
ErrorBox{ , "Failed to get last error" }:Show()
ELSEIF dwError != AE_SUCCESS
ErrorBox{ , " Advantage error = " + pacError }:Show()
ENDIF
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: Disable Advantage error message dialogs
if !AdsConnect60( "C:\", 2 )oDB := DBServer {"d:\demo10.dbf", DBShared,, "AXDBFCDX"}
lReturn := AdsGetLastError( @dwError, pacError, @wLen)
cMsg = Space( 300 )
adsGetLastError( @cMsg )
winMsgInfo( cMsg ), "Error connecting do C:\" )
endif
- Massimo Linossi
- Posts: 474
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Re: Disable Advantage error message dialogs
Hi.
If there is an internal error on AdsConnect, you have a popup message made from the ADS client
with the error number and the description. And you must click on the OK button to close it.
So the program execution is stopped until you close the error message.
And this happens also when you use the AdsExecuteSQLDirect function.
Thanks a lot
Massimo
If there is an internal error on AdsConnect, you have a popup message made from the ADS client
with the error number and the description. And you must click on the OK button to close it.
So the program execution is stopped until you close the error message.
And this happens also when you use the AdsExecuteSQLDirect function.
Thanks a lot
Massimo