cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
john703
Level 3

Backing up a Database in Custom Action

Hello,

I am upgrading the Installshield version from X to 2008.
With the new installation I upgrade the database from MSDE to SQL Express.
After I was succesfully able to upgrade the database but I need to back the database up to continue with the rest of my installation. The old syntex work but the new one doesn't for some reason.
When I try to run the new sql statement in the command promt it works successfully. It just doesn't work with Custom Action. Sometime the Installation skips the backup custom action instead of returning an error, which leads to other error down the road.

The old syntex work for prior 2000 upgrade is:
cmd.exe /c "osql-S (local)\TESTDB -d projDB -E -Q "BACKUP DATABASE PROJDB TO DISK = 'C:\Temp\PROJDB .DAT' WITH FORMAT, NAME = 'FULL BACKUP OF PROJDB"

The syntex I am using for 2005 is:
cmd.exe /c "sqlcmd -S (local)\TESTDB -d projDB -E -Q "BACKUP DATABASE PROJDB TO DISK = 'C:\Temp\PROJDB .DAT' WITH FORMAT, NAME = 'FULL BACKUP OF PROJDB"

The error I am getting is:
Error 1722 There is a problem with this Windows Installer package.

The verbose log does not tell me anything new.
Labels (1)
0 Kudos
(1) Reply
john703
Level 3

although the database have been upgraded, the compatibility is still set at 80.
I just change my sqlcmd to osql and it seem to work.
0 Kudos