Wednesday, 16 July 2008

Solution to -2147467259: failed to create SQL database

This one haunted my for weeks! I'm using WIX 3.0 as my app installer. During install i create a SQL database and run a SQL script. Everything seemed but on computers SQL Express database creation failed with
-2147467259: failed to create SQL database
After days of hacking I finally found the solution! All you need to do is use .\sqlexpress instead of localhost\sqlexpress or\sqlexpress in your connection string. I think (and I might be terribly wrong here) when you use .\sqlexpress in connection string installer uses Shared Memory instead of Named Pipes or TCP/IP.