Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL WinForm , +
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 22:54pm
Rate this: bad
good
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?
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 10 Jun 2014
Copyright © CodeProject, 1999-2015
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