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 127.0.0.1\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.

3 comments:

Anonymous said...

Thank you for a solution, it saved me a lot of time :-)

Nicholas Piasecki said...

Thanks for this! In my case I forgot to configure the firewall correctly, so it was going through TCP/IP and not being able to open the connection.

Which translates to "Gibberish number unknown error," apparently.

=)

Anonymous said...

Almost 10 years on, this still rings true. A Million thanks to you!