Multiple computer update philosophy

S

Steve

Hi All

I have several POS programs (Windows forms VS 2005)

Some customers have multiple copies of the programs, all networked to the 1
SQL Server 2005 Database which resides on 1 of the computers

The programs do auto updating from my website, where they download any new
updates and the update program runs on the next restart of the computer

Problem
If computer 1 (with Sql server) gets updated and computer 2 hasn't updated
yet, then if any Database table or field changes have been made in the
update then computer 2 may generate errors when connecting to SQL server if
it is getting data from any table where the Table field names etc may have
changed

If computer 2 (without Sql server) gets updated and computer 1 hasn't
updated yet, then if any Database table or field changes have been made in
the update, then computer 2 will generate errors when connecting to SQL
server as it will try to reference database tables and fields which may not
exist yet

What is the recommended strategy for synchronising program updates in multi
user environments?

Regards
Steve
 
G

Guest

Problem
If computer 1 (with Sql server) gets updated and computer 2 hasn't
updated yet, then if any Database table or field changes have been
made in the update then computer 2 may generate errors when connecting
to SQL server if it is getting data from any table where the Table
field names etc may have changed

For this sort of application, it's a bad idea to connect directly to SQL
server. You should implement some sort of data access layer and business
logic layer which is somewhat loosely coupled. A web service is perfect
for this... the web service could accept a POS request object, if
certain fields are missing, the web service can return with a graceful
exception for the client to swollow.
What is the recommended strategy for synchronising program updates in
multi user environments?

Definately front the database with a webservice or similar facade. It'll
provider greater security than directly connecting to the database and
allow you to run your clients across the internet.

Use a deployment tool such as ClickOnce to do automatic updates.
However, my experience with ClickOnce hasn't been exactly positive, but
others in this group seem to like it.
 
S

ShaneO

Steve said:
Hi All

I have several POS programs (Windows forms VS 2005)

Some customers have multiple copies of the programs, all networked to the 1
SQL Server 2005 Database which resides on 1 of the computers

The programs do auto updating from my website, where they download any new
updates and the update program runs on the next restart of the computer
Write a small routine which checks for updates when your program starts,
before any attempt is made to access data. If it finds an update,
advise the User (via a pop-up or whatever) then commence the download of
the update. At the end of the update, re-start the application.

Problem
If computer 1 (with Sql server) gets updated and computer 2 hasn't updated
yet, then if any Database table or field changes have been made in the
update then computer 2 may generate errors when connecting to SQL server if
it is getting data from any table where the Table field names etc may have
changed
As I "Roll-my-own" databases and don't rely on slow interfaces to such
things as SQL and alike, I incorporate a byte-value at the beginning of
every database which contains a Version Number. You could probably
emulate this by having a single file which every computer reads, before
connecting to your SQL database, and if the value in this file is
greater than a constant value set in the program then it advises the
User that their program is an "old" version and initiates an Update
routine or whatever. If the value in the file is lower, then the
program updates the value to indicate a newer program version.

Works for me!

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top