Hi,
this is my connectionstring:
mySqlConnection.ConnectionString = "Data
Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\me\Mis
documentos\Visual Studio
2005\Projects\Conferencia\Conferencia\dbConferencia.mdf';Integrated
Security=True;User Instance=True;"
and the problems comes when I publish the project, because it is not
possible to access to the database which path is in my local computer.
how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
Studio 2005\Projects\Conferencia\Conferencia\dbConferencia.mdf' for
something like .\dbConferencia.mdf?
I've tried a few different ways, but i didn't get it :(
Thanks
davidTry putting the mdf in a App_Dat folder in your project/site
and change the connection string from C:Documnet ...
to App_Data\dbConferencia.mdf'
--
Paul Zanbaka
www.mycodekb.com
"dsoto@.plus-supermercados.es" wrote:
> Hi,
> this is my connectionstring:
> mySqlConnection.ConnectionString = "Data
> Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\me\Mis
> documentos\Visual Studio
> 2005\Projects\Conferencia\Conferencia\dbConferencia.mdf';Integrated
> Security=True;User Instance=True;"
> and the problems comes when I publish the project, because it is not
> possible to access to the database which path is in my local computer.
> how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
> Studio 2005\Projects\Conferencia\Conferencia\dbConferencia.mdf' for
> something like .\dbConferencia.mdf?
> I've tried a few different ways, but i didn't get it :(
> Thanks
> david
>
Monday, March 26, 2012
How can I change a local connectionstring??
Labels:
connectionstring,
database,
documents,
local,
microsoft,
mis,
mysql,
mysqlconnection,
oracle,
server,
settings,
source,
sql,
sqlexpressattachdbfilename
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment