When using the \sqlexport command with no tables specified, the SQL command from the sqlbuffer is executed.
If there is a mistake in the SQL command (e.g., invalidselect 123
), \sqlexport exits with a Standard Error message in ADStudio 12.0.0 & 12.0.1, however in ADStudio 12 RC 23 in this case the \sqlexport would have thrown an Exception.
Is this change as intended? Or it is only an unwanted consequence because of the improvement made to continue execution in case of specifing multiple tables (e.g., \sqlexport inexistent_table_1 it2 it3
)?
The case with the failing SQL command seems more apropiate to be seen as an Exception because the \sqlexport command will having nothing left to work on and therefor it should stop/exit immediately.
This problem is seen in both \sqlexport and \sqlimport, and is introduced by the change of issue #7818.
Now, if errors occur, an exception similar to the one shown below is generated at the end of execution:
SQL export|import failed
Since error messages have been printed to the standard error, this exception will not provide any detail message.
Notes for \sqlexport and \sqlimport:
(1) \sqlexport and \sqlimport will continue to run even they ran into errors; however, error message is printed to the standard error immediately right after error happened.
(2) The exception thrown by \sqlexport and \sqlimport is only taken into consideration by the 'Stop on Command Exception' flag, but NOT the 'Stop on SQL Exception' flag. In the current FS implementation, only exception thrown from \go command will affect 'Stop on SQL Exception' flag.
SVN r29931.
Verified using ADStudio 12.0.3.
In case of an invalid SQL taken from the sqlbuffer by the \sqlexport cmd, an Exception is now thrown.
For the issue/discussion regarding the Exception thrown in case of erroneous tables added #7881 - \sqlexport with multiple (invalid and valid) tables.
Closed.
Verified using ADStudio 12.0.3.
In case of an invalid SQL taken from the sqlbuffer by the \sqlexport cmd, an Exception is now thrown.
For the issue/discussion regarding the Exception thrown in case of erroneous tables added #7881 - \sqlexport with multiple (invalid and valid) tables.
Closed.
Issue #7855 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
1 issue link |
relates to #7881
Issue #7881\sqlexport with multiple (invalid and valid) tables |
This problem is seen in both \sqlexport and \sqlimport, and is introduced by the change of issue #7818.
Now, if errors occur, an exception similar to the one shown below is generated at the end of execution:
SQL export|import failed
Since error messages have been printed to the standard error, this exception will not provide any detail message.
Notes for \sqlexport and \sqlimport:
(1) \sqlexport and \sqlimport will continue to run even they ran into errors; however, error message is printed to the standard error immediately right after error happened.
(2) The exception thrown by \sqlexport and \sqlimport is only taken into consideration by the 'Stop on Command Exception' flag, but NOT the 'Stop on SQL Exception' flag. In the current FS implementation, only exception thrown from \go command will affect 'Stop on SQL Exception' flag.
SVN r29931.