Click here to Skip to main content
12,953,379 members (51,516 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 9-Jun-14 21:54pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


Attach DB SQL Server :[^]

Restore Database SQL Server :[^]

Connection string & Config :[^]

Do you required any thing else?


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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,930

Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 10 Jun 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100