Seems a bit strange. We are using pretty complex scripts up to 1.5
MBytes - no problems.
Michael
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dhaval
Patel
Sent: Wednesday, 20 December 2006 3:10 PM
To: Rob Mensching; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] SQL Script
I tried saving the SQL file as ANSI, UTF-8, Unicode, etc. The SQL script
does get read in the memory, but the msi still blows up while executing
the script. I keep running into the Error Executing Script bug - which I
think is still open. So I think it is safe to assume at this point that
I should probably stay away from WIX if I want to execute complex SQL
queries?
_____
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Fri, 15 Dec 2006 11:31:40 -0800
Subject: RE: [WiX-users] SQL Script
Have you tried saving the file as Unicode? Notepad (on XP) can
do this when you do Save As->Encoding drop down box.
From: Dhaval Patel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 12, 2006 14:56
To: Rob Mensching
Subject: RE: [WiX-users] SQL Script
I am using 2.0.4611.0. Mike Dimmick had the following tip. I am
not sure if that indeed is the issue. I skimmed over the links that he
sent me, but most of that stuff is Hebrew to me in the first link :).
The content of the second link did raise an eyebrow, because I think I
did create my .sql file in NotePad2 (or TextPad). Possibly you can throw
some light on the issue. I can forward you the .sql file I am using.
Thanks.
You probably have a UTF-16 script without a leading Byte Order
Mark (U+FEFF, the byte sequence 0xFF 0xFE for UTF-16 little-endian).
Without the BOM, the SQL custom action assumes that the script is ANSI
and converts using MultiByteToWideChar. If the data is actually UTF-16,
the script will simply appear to be a 'C' followed by a NULL byte.
Just a thought here, but should we really be using the end
system's ANSI codepage to convert to UTF-16 here (the code has CP_ACP)?
If you install on a system with a different codepage from that the file
was generated on, you could get unwanted results.
I think it would be better for the compiler to do the conversion
before storing the script to the Binary table. That would allow us to
drop the UTF-16 detection and conversion code in the custom action.
Other thoughts: use the codepage of the MSI database itself (looks quite
difficult: http://msdn2.microsoft.com/en-gb/library/aa368277.aspx), or
extend the schema to allow the appropriate codepage to be recorded. This
would probably be a good idea even if the compiler is extended to
convert the script to UTF-16 first. Alternatively we could just drop
support for non-UTF-16 scripts, but that's a little unfriendly.
One idea I really wouldn't recommend is using the IsTextUnicode
function: see
http://blogs.msdn.com/michkap/archive/2006/06/14/631016.aspx.
--
Mike Dimmick
_____
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED];
wix-users@lists.sourceforge.net
Date: Tue, 12 Dec 2006 08:20:44 -0800
Subject: RE: [WiX-users] SQL Script
What version of the WiX toolset are you using?
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dhaval
Patel
Sent: Monday, December 11, 2006 17:18
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] SQL Script
I am a WIX newbie and I think I have been able to grasp
most of the functionality via trial and error over the last week or so.
Nevertheless, making this SQL script execute has been driving me nuts. I
am hoping one of you experienced folks will be able to help me out. I
have attached an image of the error I receive upon installation and here
is the exact text of the error:
"Failed to execute SQL string, error detail: Could not
find stored procedure 'C'., SQL Key: Script SQL string: C"
The very first line I had in my SQL script is: CREATE
TABLE [dbo].[DataMerge]
Before that I had the line: USE TABLE [MergeFiles] and I
received this error - "Failed to execute SQL string, error detail: Could
not find stored procedure 'U'., SQL Key: Script SQL string: U"
It seems that no matter what I put in the my sql script,
it errors out on the first character. Here is my WIX code:
<Component Id ='SqlDatabase' DiskId='1'
Guid='7FE20B5C-FF37-4618-8D6F-3D04BD66E845'>
<SqlDatabase Id='Sql' ContinueOnError='no'
CreateOnInstall='yes' Database='MergeNist'
CreateOnReinstall='no' DropOnUninstall='yes'
Instance='[SQLINSTANCE]' DropOnReinstall='no'
User='MySqlUser' Server='[SQLSERVER]' >
<SqlScript Id='Script' BinaryKey='CreateSql'
ExecuteOnInstall='yes' />
</SqlDatabase>
</Component>
<!-- Path to Sql script -->
<Binary Id='CreateSql' SourceFile='Database.sql' />
Let me know if I am missing anything. It'd be thrilling
for my entire team if I get this to work. I am able to create a virtual
directory, a Windows user, install a service, and various assmeblies to
the GAC. This is the only thing that's not working. Thanks in advance!
_____
All-in-one security and maintenance for your PC. Get a
free 90-day trial! Learn more!
<http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail>
_____
Check the weather nationwide with MSN Search Try it now!
<http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG>
_____
Get the Live.com Holiday Page for recipes, gift-giving ideas, and more.
Check it out!
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users