Thank you for the suggestion. Originally I generated a bunch of INSERT
statements but the data in one of the columns was not only large an was subject
to truncation but it contained XML and HTML that was hard to escape in a
consistent manner before I feed it to the SqlScript. I guess I am left to using
SqlString. I have started to play with it but the command seems to be silently
ignored. In the log file I see that the property is getting set but I don’t see
where the SqlString task actually executes. More importantly I look at the
database and there are not lines inserted. I am using the following task:
<SqlString Id='CreateStaticContentBulkData' SqlDb="Content"
ExecuteOnInstall='yes' ContinueOnError='no' SQL="BULK INSERT StaticContent FROM
'[SERVICEINSTALLDIR]StaticContent.dat' WITH (DATAFILETYPE='native')" />
Like I said I see the following in the log:
MSI (s) (64!24) [01:57:50:710]: PROPERTY CHANGE: Adding ExecuteSqlStrings
property. Its value is
'Content€devbrain01€€Content€-2147483648€1€€€CreateStaticContentBulkData€1€BULK
INSERT StaticContent FROM 'D:\Program Files
(x86)\BsiServices\ServiceHost\StaticContent.dat' WITH
(DATAFILETYPE='native')€CreateEmailContentBulkData€1€BULK INSERT EmailContent
FROM 'D:\Program Files (x86)\BsiServices\ServiceHost\EmailContent.dat' WITH
(DATAFILETYPE='native')'.
MSI (s) (64!24) [01:57:50:710]: Creating MSIHANDLE (2307) of type 790531 for
thread 804
MSI (s) (64!24) [01:57:50:710]: Closing MSIHANDLE (2307) of type 790531 for
thread 804
MSI (s) (64!24) [01:57:50:710]: Doing action: ExecuteSqlStrings
Action 1:57:50: ExecuteSqlStrings. Executing SQL Strings
Action start 1:57:50: ExecuteSqlStrings.
1: Executing SQL Strings
But there doesn’t seem to be an indication of error as there should be because
the lines are not getting inserted and the .dat file is over 2Mb so SOMETHING
should be inserted.
From: Mike Dimmick [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 13, 2007 4:40 AM
To: 'Kevin Burton'; 'Rob Mensching'; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] <SqlScript> and external file?
I don’t think you should rely on the working directory. You can use property
substitutions (e.g. directory locations) in <SqlString>, but not in <SqlScript>.
If you don’t have much data to preload you might be better off generating a
bunch of INSERT statements, however.
--
Mike Dimmick
_____
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Burton
Sent: 13 May 2007 07:16
To: 'Rob Mensching'; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] <SqlScript> and external file?
The specific script that I am trying to use is
BULK INSERT Table
FROM 'Table.dat'
WITH (DATAFILETYPE='native')
When I try to run these lines in a <SqlScript> I get an error indicating that
the file (table.dat) could not be found. When <SqlScript> executes what is the
working directory?
From: Rob Mensching [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 12, 2007 12:09 PM
To: Kevin Burton; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] <SqlScript> and external file?
Didn’t know you could write a SQL script that had dependencies outside of
itself. Sounds like “dependency creep” to me. In the latest version of WiX v2
and WiX v3, SQL String/Script processing takes place before RemoveFiles and
after InstallFiles, so the files should be in place when your script executes.
Other things may not be in place (for example, GAC’d files definitely won’t) so
beware.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Burton
Sent: Friday, May 11, 2007 6:47 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] <SqlScript> and external file?
I have a need to generate a SQL script that references an external file. My
question is when the script is executed can I depend on the file that it
references to be “there” with the same file name? Should this file be included
as a <binary> or as a <file>? I don’t want to install this file I just want it
to be present so that the Sql script will run to completion. Any examples on a
Sql script referencing another file in a WiX installation script?
Thank you.
Kevin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users