[RESOLVED] Database (SQLCE) Deployment Entity Framework
I was wondering what the standard practice for deploying your database is. Do you create the database ahead of time and attach it to your project? Can you use the EDMF model to create the database when the user installs it (and if so, how do you do that?)?
How do you update the database if you had to make changes?
Thanks for your help ahead of time!
Re: Database (SQLCE) Deployment Entity Framework
This question can be answered in many different ways all based on the scale of the implementation.
How big an app? How many customers need upgrades?
How many of your customers have "unique" enhancements that you have to be careful to not tread upon??
Re: Database (SQLCE) Deployment Entity Framework
The app will contain records in the order of 2,000 and up to 40,000 rows or even more plus other information. It is a consumer product so there can potentially be thousands of users. The database itself will be the same for all except those that don't upgrade to the newest app (or bug fix). I haven't sold the product yet, so I can't know for sure, but I'm pretty sure I won't get the database right the first time.
Re: Database (SQLCE) Deployment Entity Framework
If this is sqlce - I had a similar issue a few years ago and I created an UPDATE app to download a new DB and convert it from a prior version.
What type of CE device are you working against?
Re: Database (SQLCE) Deployment Entity Framework
Re: Database (SQLCE) Deployment Entity Framework
Device? Are you working with a pocket PC?
Or are you working with a desktop application that just uses a SQL CE database for the convenience of it?
Re: Database (SQLCE) Deployment Entity Framework
Desktop that uses sqlce for local access only.
Re: Database (SQLCE) Deployment Entity Framework
Our pocket PC app "creates" the SQLCE database on the pocket PC from a script fed to it from a network database.
You will basically have to do something similar - rename the old DB in code - create a new DB in code - create the DB objects (sql ce means pretty much just tables - right?).
And then move data from old db to new db in code as well.
How did you create the SQL CE DB you are using for development right now?
Re: Database (SQLCE) Deployment Entity Framework
I can create it from the model and then ship it with the project. But I thought maybe I can create it from the model after it is shipped, but I haven't seen how to do that anywhere and don't know if it is possible.
Re: Database (SQLCE) Deployment Entity Framework
Once it gets data in it at each customer location...
And mix that with the "unknown nature" of what you might change...
Are you expecting that you can just "ship out" a bunch of ALTER TABLE statements - and run those against the DB? (Can you run ALTER TABLE against a CE database?)
Re: Database (SQLCE) Deployment Entity Framework
My question was answered over at
http://stackoverflow.com/questions/5...ogrammatically
Thanks for your help.