cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Singaravelan
Level 4

SQL Script Handling

Dear Friends,

We are using MSI Installer for running our 100+ scripts for our release. We have configured for the installer to quit in case of any sql script issue in Oracle.

We have a requirement where we need to log the script which has run, but this is not possible for the moment as Installshield does not support logging the sql script run.

Our requirement, hence changed to : In case of any error during the installation, the user needs to see the script which is creating the error. For example in the error screen, there should be a button which display that particular script file which can be used for analysis.

Do anyone have any idea how this can be done?

Thanks
Velan
Labels (1)
0 Kudos
(2) Replies
TheTraveler
Level 8

Once upon a time, I used a custom DLL that was made in house that would connect to, parse a SQL batch file, and run SQL statements one at a time with a progress bar. This way if an error occurs, you will know the SQL statement that caused the error and get the error message from the database server. This worked well for many years until Oracle revamped the pricing and support licenses for their database engine. We then migrated to Microsoft SQL Server. To make a long story short, I eventually abandoned the use of using a custom DLL. Instead I'm now using ADO COM objects within Install Shield Script Code.

See if there is a set of COM objects you can use to connect to the Database Engine. Then you could run the SQL file yourself. You will total control as to what happens. If a COM object is not available, then you might have to go with creating a C++ DLL that can connect to the database and run your SQL file. Again, you will have total control of what happens.

Good Luck...
0 Kudos
Singaravelan
Level 4

Dear Traveller

thanks for your reply and valuable inputs. I will try this option but it would be difficult for me as i am not a C++ guy. Hope some one will be able to provide a simpler solution for this stuff.

Thanks,
velan
0 Kudos