I think the ORDER BY is as it is to optimize connections to SQL databases.  I 
think you'll find the code expects the DBs to be grouped thus.  It's an 
arguably poor design choice for your scenario but that is the current design.  
Fine to suggest a feature request to change the behavior.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Sleightholm
Sent: Thursday, August 21, 2008 22:40
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] SqlString Element Sequence

I was just looking at the source for the SqlString Element and I think I
have spotted a bug but would appreciate any comments before raising it.
The line in question is this:



LPCWSTR vcsSqlStringQuery = L"SELECT `String`, `SqlDb_`,
`Component_`,`SQL`,`User_`,`Attributes`,`Sequence` "

L"FROM `SqlString` ORDER BY `SqlDb_`,`Sequence`";



I think the "ORDER BY" is wrong, if I set the Sequence I would expect
the strings to be run in the sequence I specified but I think it runs
them in sequence per database which may not be correct. For example, if
I create a table in db2 and then later on I have stored procedure in db1
that references it I would prefer that they were created in the order I
specified, but this "ORDER BY" would create them in the reverse order.
In this case it shouldn't matter as SQL Server will take care of it but
if I wanted to create a function in one database that is called as part
of my install from other databases it would fail.



I would suggestion this should be:

L"FROM `SqlString` ORDER BY `Sequence`";

or

L"FROM `SqlString` ORDER BY ` Sequence `,` SqlDb_ `";

If you wanted to resolve duplicate sequence numbers.



Neil



Neil Sleightholm
X2 Systems Limited
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to