Delete database if it exists....

Forum for users of SQL Packager database archive utility

Delete database if it exists....

Postby splitpete » Thu Aug 26, 2010 10:07 am


I would like to create an exe that installs a database. I am able to do that easily enough. However, if the database already exists on the specified machine, I want the existing database to be deleted and the new version to be installed in its place.

I attempted to do this by creating a script and inserting the appropriate code to perform the delete in the script and then creating an exe from that script. This does not work. The exe tells me there is already a database by that name and won't continue until I provide a different one. I know it has not reached the script at this point.

Is there a way to do this?

Thanks in advance

Posts: 5
Joined: Thu Aug 26, 2010 9:53 am

Return to SQL Packager Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests