PDA

Click to See Complete Forum and Search --> : Exit Code in VB


googie
Nov 30th, 1999, 08:30 PM
Does anyone know if there is a way to capture an error code generated from a shelled VB application? In C the equivilant is return(0) or exit(0) - which would return 0 for the error number. I can use the Err.Raise to return an error, but this application will shell, execute, then close without any user intervention - if I use the Err.Raise I will get a popup and the process doesn't clear from memory. Any help would be appreciated.

Aaron Young
Nov 30th, 1999, 09:04 PM
How about Generating an Error Log File?

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net

googie
Nov 30th, 1999, 09:11 PM
Don't think that would work for what I need it for. I am using SQL 7 and have written an application that will be scheduled to run nightly to compile data that has been entered throughout the day. SQL 7 knows if a scheduled application has completed successfully by the exit code that it returns. W/o that exit code I will not know if the job failed or succeeded.

JHausmann
Nov 30th, 1999, 09:12 PM
You could raise an error in SQL 7, which could be logged...

googie
Nov 30th, 1999, 09:17 PM
If I cannot return an errorcode how would SQL know that an error has occured? Would I still be able to use the notification services that are built into SQL (ie it pages me when the job fails) if I write the error to the log?