All:

 

I'm using SqlString to affect changes to the database during
installation.  Here is a snippet from the wxs file:

 

<sql:SqlString Id="InsertCabinetScript" ExecuteOnInstall="yes"
Sequence="6"

SQL="IF NOT EXISTS (

  SELECT * FROM Cabinet WHERE [Name] = '[SQLSERVERDATABASENAME]'

)

INSERT INTO Cabinet ([Name], StorageProvider)

VALUES ('[SQLSERVERDATABASENAME]','[STORAGEPROVIDERCONFIG]' )" />

 

I'm getting the following exception during install:

 

Error -2147217900: failed to execute SQL string, error

Detail: Line 4: Incorrect syntax near ','., SQL key:

InsertCabinetScript SQL string: IF NOT EXISTS (

    SELECT * FROM Cabinet WHERE  = 'installTest'

)

INSERT INTO Cabinet (, StorageProvider)...

 

As you can see the error message includes the first bit of the script
and "Name" is being replaced with an empty string in the two places it
shows up.  I have tried Name and [Name] in the script with the same
results for each.

 

Any help on this is greatly appreciated.

 

Regards,

 

Steve Braswell

Informa Software

 

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to