We are creating an application in VB that accesses both Oracle and SQLServer databases, and we need some degree of consistency between the VB code accessing the one and the other. VB calls stored procedures on both databases.
In the case of Oracle, to my knowledge the best way to propagate an error (such as a user error) from a stored procedure to the VB app is to use "raise application error." I assume VB has a natural way to handle these errors and their messages -- right?
SQL Server however returns a code from the stored proc (Oracle stored procs do not return anything); additionally, our developers want SQL Server to pass error numbers and messages via parameters.
Is it better, or ok to use have the Oracle stored proc pass out an error message and number as parameters in this case, in order to keep the VB code interfacing with Oracle consistent with the code interfacing with SQL Server; or is it better to use the Oracle procedure "raise application error"? How does Visual Basic handle output from Oracle's "Raise application error" procedure?
I would very much appreciate opinions and views on this -- thanks!