I don't know WiX that well, but I know SQL. It might be that you are
connecting under a different user profile. For example, the script in .sql
could be attempting to change to a database that it does not have permission
on or is not accessible by DNS from the installing machine.

 

Also, you may be installing to the wrong instance of SQL. There might
already be SQL express or SQL server on the machine.

 

To find out where it is going wrong I recommend pausing the installing
somehow after the database has been created (perhaps calling a batch file
with the pause command in it) and then manually running the script in SQL
enterprise manager / Query Analyser or osqlw.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gregor Colnik
Sent: 16 April 2008 12:17
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] how to create strangely named database

 

I need to create a database named (for example) >test._db<

 

If i write it like this

<sql:SqlDatabase Id="SqlDatabaseSql" User="SqlUser"
Database="[\[][CREATEDBNAME][\]]" Server="[CREATEHOSTNAME]"
CreateOnInstall="yes" CreateOnReinstall="yes" CreateOnUninstall="no"
ContinueOnError="no" DropOnInstall="no" DropOnReinstall="no"
DropOnUninstall="no">

 

 

Where [CREATEDBNAME] is a property with value of >test._db< It creates the
database ok, but when i try to execute any of the <sql:SqlScript> or
<sql:SqlString> 

For example:

<sql:SqlScript Id="CreateTablesSql" User="SqlUser" BinaryKey="CreateTables"
Sequence="1" ExecuteOnInstall="yes" ExecuteOnReinstall="yes"
ExecuteOnUninstall="no" ContinueOnError="no" />

 

where CreateTables is a binary id and source is .sql file with the script i
need to run on new database,

it returns an error

 

Error 26203. Failed to connect to SQL database.  (-2147467259   [test._db]
)

 

 

 

Any help about how to create database with strange names and run scripts in
it is appreciated. Could be that i'm just escaping characters wrong somehow.

Thank you

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to