Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi all,

I have a winform application which works with a database created by sql express.
This application should work on a local network.It is client base and should install and run on each client in the local network.However the sql express server in on the server of network but not on clients.

Also i have created a setup for my application and add it's database to the setup project.

Now the problem is that how can i attach the database to the sql express on server after installing the setup project on the clients?
Posted

You cannot attach a new database from another computer.
When you attach a database on the SQL Express, all database files (.mdf, .ldf) has to be in the computer where SQL Express is running.
The same goes for restoring a database.

Perhaps it is easier to attach the database manually on SQL Express?
 
Share this answer
 
Hi,

Attach DB SQL Server : http://msdn.microsoft.com/en-IN/library/ms190209.aspx[^]

Restore Database SQL Server : http://msdn.microsoft.com/en-IN/library/ms177429.aspx[^]

Connection string & Config : http://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx[^]

Do you required any thing else?

Thanks,
Suvabrata
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900