From: helveticus on
Hi, I hope this is the right forum. I just loaded VWD2010 via the MS
installer tool. VWD2010 appears to work fine except that I am unable
now to connect to the local database. Also, the Db creation option is
grayed out.

Attempting to open the local db raises the following error message:
"Failed to generate a user instance of SQL Server due to a failure in
starting the process for the user instance. The connection will be
closed."

All processes are enabled in the SQL Confguration manager (Shared
memory, named pipes, TCP/IP, etc.).

Someone posted a similar question last month (Harlan Messinger, Mar
27). One of the posters thought the issue was related to
authentication.

The local connection string (which worked fine in VWD2008) is:
<add name="conLocal" connectionString="Data Source=.
\SQLEXPRESS;AttachDbFilename=|DataDirectory|\localDB.mdf; Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/
>

I noticed that SQLServer 2008 works if the connection string is set
via "Microsoft SQL Server (SqlClient)" (eg. Data Source=localHost
\SQLEXPRESS;Initial Catalog=localDb.mdf;Integrated Security=True.).

However, substituting "localHost\SQLEXPRESS" for ".\SQLEXPRESS" in the
connection string yields the same run-time error.

TIA for any suggestions
From: helveticus on
After re-visiting other forums, I changed the the user instance from
"true" to "false" in the connection string ie:

<add name="conLoc" connectionString="Data Source=locSrv
\SQLEXPRESS;AttachDbFilename=|DataDirectory|\locDb.mdf;Integrated
Security=True;User Instance=False"
providerName="System.Data.SqlClient"/>

This seems to do the job.
From: Gregory A. Beamer on


"helveticus" <msch.prv(a)gmail.com> wrote in message
news:66797901-5692-45c1-a31d-95639a88009c(a)u31g2000yqb.googlegroups.com...
> After re-visiting other forums, I changed the the user instance from
> "true" to "false" in the connection string ie:
>
> <add name="conLoc" connectionString="Data Source=locSrv
> \SQLEXPRESS;AttachDbFilename=|DataDirectory|\locDb.mdf;Integrated
> Security=True;User Instance=False"
> providerName="System.Data.SqlClient"/>
>
> This seems to do the job.

Unless you are deploying to an ISP that uses Express, this is not the wisest
way to work with databases. You can, of course, set up the connection
however you like in production, without regard to development, but it is
easier to keep them as similar as possible.

You can use SQL EM to attach the database and then connect using
server/database syntax without the UserInstance bits. Then the database will
actually be in the server, as it will be on many ISPs.

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************