I'm looking for a low cost solution.
xProgrammer wrote:Hi Marco
You can actually do client server with [x}Harbour code alone. It doesn't give you all the features you may get with an SQL based product but it is very fast and easy to understand.
I did exactly that when faced with the exact same situation that you seem to be facing. I used IP sockets as my transport layer and arrays serialized using HB_Serialize() and HB_Deserialize() to wrap up query details and returned data and error codes.
Some other nice features of this approach are:
you can use existing tables unaltered
if your code is OO you can directly update object properties
it is a cross platform solution ( clients and servers can be run on any OS that supports [x}Harbour and its TIP library.
This isn't the solution for everyone but if you are interested I can provide you with some working code. When I wrote this I took the opportunity to restructure how my queries worked (so that they are now basically parameterized objects) but that isn't necessary.
If you have a relatively large number of clients you may need to implement threads - I may do that at some point inn the future - currently I effectively have a series of servers (on the one physical PC) listening on different ports and different clients use different ports (read form a local config file). It arguably isn't the prettiest way but it is very effective and reliable.
Regards
Doug
PS I originally coded this in xHarbour but then switched to Harbour but it will work in either.
Enrico Maria Giordano wrote:My best wishes for a fast recovery to your Mum.
EMG
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 100 guests