FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Sync databases
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Sync databases
Posted: Thu Oct 14, 2010 02:37 PM

Hi,

I have an older application that was never intended for networking ...
Now I have customers that would like to have more than one pc running my app but have the data the same on all pc's

Can anyone please suggest some ideas as to how I could accomplish this?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Sync databases
Posted: Fri Oct 15, 2010 01:17 AM

Jeff,

I'm afraid you will have to rewrite it to be multiuser.

I learned a long time ago to always write multiuser apps--they still work with one user and they are no more difficult to write if you have the needed classes.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 564
Joined: Thu Oct 13, 2005 09:23 AM
Re: Sync databases
Posted: Fri Oct 15, 2010 06:16 AM

James,
Can you post or explain how work your classes to write multiuser apps.
Regards,
José Luis

Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: Sync databases
Posted: Fri Oct 15, 2010 12:02 PM

Hi James,

I hear you ... I too learned that lesson. Unfortunately this app was before that lesson :(

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Sync databases
Posted: Fri Oct 15, 2010 03:15 PM
José,

Can you post or explain how work your classes to write multiuser apps.


The main issue is database access--record locking. This can be handled using TDatabase or my enhanced TData class. Then you always open data files in shared mode and always lock records for updating. These classes contain all the code to allow you to do this with minimal programming effort. For example with my TData class and a small subclass, you can do:

oCustomer:= TCustomer():new()
oCustomer:seek( cCustNo )
oCustomer:= "999-999-9999"
oCustomer:save()
oCustomer:end()

The above code is completely multiuser. It also has built-in automatic retrys if the record is busy during an attempted save.

Another useful class is a user class. This allows you to store and retrieve user security and preferences.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: Sync databases
Posted: Sun Oct 17, 2010 07:22 PM

Anyone has some experience using Tdata Class with ADS/ADT
I mean if we can use all Tdata power with Advantage Database Server ADT extension, instead of DBF.

Regards

George

Continue the discussion