hi,
i have a project written in visual studio 2008. and i copied the folder to the network drive. and from another pc when i run the exe file of the application an error occurs because the connection string is different, how can i make the application which is in the network drive to access the mdf file in another computer(where the application was created)

how can i change the connection string so that it can access the original mdf file???

can some one give me some guidelines
thaxx

appreciate a lot

thaanxxxx

You have to manualy write the full path to the YourDB.mdf file.
So repair the path in theconnection string.

it is the full path from the c drive of the computer,
what should i change more than that

Is the conn. string written like that:

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\myFolder\test01DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"

C:\myFolder represents the full path!

Is the conn. string written like that:

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\myFolder\test01DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"

C:\myFolder represents the full path!

het in windows login you have to ad the windoes login user to the sql server,
then i could login to the sql server and the projects works fine

but in sql server authentication i coudn't make it
can't connect it that way
why is that

Simple Buddy...

Just Use SQL SERVER Configuration Manager & Have TCP IP Enabled For The Server Instance , Then Open INCOMING For The Port 1433 Or Any Other The Port You Selected In The Manager Using Windows Firewall.

Then The Connection String : server=10.20.30.40,1433;database=myb;user=sa;pwd=***

Use This In All Your PCs Networked . No More need of copying the mdf file, just the exe file.

This article has been dead for over six months. Start a new discussion instead.