Sunday, February 12, 2012

Connect to sqlexpress

Hi, I have SQL 2005 developer edition on my laptop. I am wondering if it is
possible to work with databases created for sql express edition. What I mean
,
is that I have VS 2005, I created a Personal web site starter kit. The wizar
d
creates database files in the app_data directory.
So is it possible to connect to this "personal.mdf" while we have the
developer edition and the express edition. If yes, how can we do that
In the web.config I have
connectionString="Data Source=.\sqlexpress;Integrated security=True;User
instance=True;AttachDBFilename=|datadire
cor......"
Thanks for your helpFor security/performance reasons, the dynamic attachment of a MDF file using
the parameter AttachDBFilename in the connection string is only available
with SQL-2005 Express and not with the other editions of SQL-2005.
So you will have to permanently attach the mdf file to the Developer
instance or install an instance of SQL-Express on your machine. You can
have both instances running at the same time but you cannot have the same
mdf file attached to both instances at the same time.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"SalamElias" <eliassal@.online.nospam> wrote in message
news:B4E5748E-176A-427E-8507-912A020D11EB@.microsoft.com...
> Hi, I have SQL 2005 developer edition on my laptop. I am wondering if it
> is
> possible to work with databases created for sql express edition. What I
> mean,
> is that I have VS 2005, I created a Personal web site starter kit. The
> wizard
> creates database files in the app_data directory.
> So is it possible to connect to this "personal.mdf" while we have the
> developer edition and the express edition. If yes, how can we do that
> In the web.config I have
> connectionString="Data Source=.\sqlexpress;Integrated security=True;User
> instance=True;AttachDBFilename=|datadire
cor......"
> Thanks for your help

No comments:

Post a Comment