PDA

View Full Version : SQL Connection Create DB?



DeployIT SA
05-24-2004, 12:56 PM
Hi

I'm converting a DevStudion project to InstallShield X. In the old project I used DMO to attach the DB. We tried using the SQL Server to create and populate the DB but using DMO to attach the DB is must faster.

Problem:
I have to execute a SQL Script every other update for which I’m using the SQL Server, SQL Connection and Scripts. For a new install I attach the DB once the LDF and MDF is installed and before IS execute the SQL Script. IS is creating the DB in SQL Connection before the files are installed if the DB does not exist. The attach DB is not working because the DB already exist and then scripts are failing because the DB is blank.

Why is IS create the DB and how can I stop it.

hidenori
05-24-2004, 01:33 PM
Hi,

InstallShield X SQL runtime always creates the target database to run associated SQL scripts when it doesn't exist. We may need to provide an option to turn on/off this functionality. I submitted the work order #1-O45AH to consider this issue in a future release.

For now, you can drop the database if exists before attaching it in your SQL-DMO script code.

Hope this helps.
Hidenori Yamanishi
InstallShield Software Corporation