-
November 1st, 2011, 09:50 PM
#1
Forms application background database
I'm coding a server/client program so that multiple clients can connect to the server and access the information that I want to store. I have the server/client relationship setup with a WCF service hosted inside a windows service for a server and a forms client that connects to it and calls the functions the service offers.
My problem is, I need to deploy a database with the server side install and I'm unsure on how to do that. From just browsing the options in Visual Studio I can add an MDF database to the project and build the app that way and have the installer install SQL express, but I don't know if that is the right way. Just seems to me that an MDF sitting in the install directory for the program doesn't look correct, I've never seen anything else done like that. Also, when I have a database correctly added to the project and deployed, how do I update that database? The GUI and libraries are a simple overwrite, but when the server has real data in it, it can't just start over every time an update goes out.
Any insight on this would be greatly appreciated. Thanks in advance.
-
November 8th, 2011, 09:31 PM
#2
Re: Forms application background database
Does anyone have any suggestions for this?
-
November 9th, 2011, 07:37 AM
#3
Re: Forms application background database
If I'm not wrong, you're supposed to attach the database to the server. Ofcourse, you need to have SQL Server Management Studio installed for that because Visual Studio doesn't facilitate it.
-
November 10th, 2011, 12:32 PM
#4
Re: Forms application background database
Originally Posted by Dragster93
If I'm not wrong, you're supposed to attach the database to the server. Ofcourse, you need to have SQL Server Management Studio installed for that because Visual Studio doesn't facilitate it.
The database is added to the server project and I can manage it with management studio installed. My question is that when compiled the MDF is part of the output files and I've really never seen any programs come with an MDF in their installation directory. Also the other part that confused me was how to update the structure of the database during a program update so as to not overwrite any data the user(s) already have stored in a deployed environment.
-
November 26th, 2011, 02:49 AM
#5
Re: Forms application background database
Just gonna bump this up and see if anyone else has any other insight. Still trying to work on this project. Been researching forms apps with database backgrounds and can't really find any other types of implementation, but I still don't feel like this is the correct way of doing this. Nor have I found a way to execute structure changes in a program update for already established databases.
-
December 1st, 2011, 03:19 PM
#6
Re: Forms application background database
to have a mdf attached to your application is actually using sql server compact edition. usually it's not suitable for server side. better have sql server expression edition or above, which is normally installed manually. if you mean to initialize your db, you need to create a sql script to run against your sql server.
-
January 26th, 2012, 07:43 PM
#7
Re: Forms application background database
Sorry that I'm not responding for awhile. This type of confusing problem is something that causes me to lose interest in a project that I don't have a deadline for.
I need to install my application with an initial MDF, which will not use compact edition, I'm going to install express in my installer package and attach the DB to the express installation. Then, if I run an update, I need a way from the installer to run structure updates to the DB from an SQL file. Can anyone recommend an installer to do this and how I might use it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|