Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Database > SQL Server > SQL Server Compact Edition

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2007, 5:38 PM
95se5m's Avatar
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Nov 2004
Location: NE Pennsylvania
Age: 37
Posts: 21
Reputation: 67
95se5m is on a distinguished programming path ahead
Default Database Schema Comparison

Hello all. I am using Sql Compact Edition for a small standalone application, I create and build the initial database schema on the initial startup of the application. What I am looking for is a way to upgrade the software and on initial startup of the new version, I would like it to compare the existing database with a new schema and then update the database based on the difference. This way I can have a version that will update the database without me having to know what version it is to begin with. Is there a way to do this or am I asking too much?

Thank you,

Jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-25-2007, 2:10 PM
95se5m's Avatar
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Nov 2004
Location: NE Pennsylvania
Age: 37
Posts: 21
Reputation: 67
95se5m is on a distinguished programming path ahead
Default

Anyone? Please....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-25-2007, 9:18 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Sep 2006
Posts: 60
Reputation: 46
Cavar is on a distinguished programming path ahead
Default

We did something almost like this for an app that used MSDE. For each patch we deployed we just included a scripts.sql text file with all the sql statements that would update the client database.

The client app updater would execute these scripts and your database would be up to date.

However, you want to send the new schema down to the client app and compare it to the client database, then generate all the necessary changes to be applied.

Our clients would always have to update all patches in order so that no update scripts were missed, which means they may have to apply 5 patches if they haven't updated in awhile. So, the way you want to do it may be better but, if you plan the method we used out correctly it will work just fine.

Either way you're going to have to know how to write the update scritps that are going to be applied to the client database since I don't think there's an automatic way to compare the schemas and generate the scripts, then run them. But who knows, you may get lucky and find a way to do it.

Good luck,
CT
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 4:53 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.