Brian Donahue wrote:Yes, PRESQL simply uses the functions that Packager already has built-in to run a SQL file before the package. I think it will fail silently, though. At any rate, if there are errors in the presql script, that doesn't stop the package from running. It's debatable whether a failure in the presql script should affect the package execution.
When you are using an installer to install a product that has a database, during these installs it is very important to know if there is an error during execution of the /presql: or /postsql: scripts. Silent failure is not helpful.
Is there any way to return an error code if the /presql or /postsql scripts fail? Even detecting the presence of an error would be helpful, but more information is always better. Right now it fails silently, the error flashes by in the DOS window, and the window typically disappears before the error message can be read.
Even leaving the error up to be seen in the DOS window instead of shutting it down immediately after execution halts would help. At least the user would know an error happened during the install without having to watch the screen every second of the install to see if an error message flashes by or not. The installer may not be able to detect it, but at least there would be SOME indication that things did not go well.