Click here to Skip to main content
15,886,798 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am developing a windows application project using c#, sql server2012. Now I want to run this application in other computer. How it possible??.. Now I am taking backup of database from my system and restore it into the system which I want to install my exe. But It is not possible in all the times. Because restoring this database into all the systems and also changing the connection string in program as the current system servername are not possible in all the times. can anyone say any solution to this problem??How can i make exe with database?? I am creating setupfiles using install shield.
Thanks
Posted
Comments
Mantu Singh 19-May-15 6:16am    
You want each computer to have separate data or same data as in a network ?

1 solution

That is a really, really poor idea.

SQL server is a multiuser system, which requires an installation of SQL Server to be available to all computers that want to use the database - and that is not a "normal user" application to have available. In addition, using SQL Server for single user databases is a spectacularly bad idea - as each user will presumably want their own copy of the data rather than to share it. So if you get two users in the same office installing your software...one of them is going to get very upset...

If you want a single user database, then use a single user database: SQLite, SQLCE, or even Access.
If you want a multiuser database, then the last thing you want to do it blindly try to install your database with each application. And you don;t even know there is an SQL installation on the LAN segment...
 
Share this answer
 
Comments
Mantu Singh 19-May-15 6:33am    
Great sir I can remember
where should you store your data!!
Member 10994712 20-May-15 1:56am    
I am new in this area. That's why I asked to you. Then how can I change connection string in program??
OriginalGriff 20-May-15 2:07am    
:laugh:
That depends on how you are storing it!
Please, don't tell me it's hard coded into your app?
Member 10994712 20-May-15 2:54am    
data storing is done through query.
OriginalGriff 20-May-15 3:08am    
You are storing your connection string in a database? I don't think so...

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