• Welcome, Guest. Please login.
 
October 20, 2019, 11:53:25 pm

News:

Welcome to the SQLitening support forums!


client server operations

Started by John Lever, May 05, 2009, 10:43:04 am

Previous topic - Next topic

John Lever

Dear All,

I am a bit confused from the doumentation project about how to change something from local to client server simply.

If no routers are involved (presumably using WINDOWS workgroups or something similar with a few users - the doc. just suggests you connect via a server name. Is each client started in local mode in this case ?

It then goes on to say that this first usage of SQLITENING is unsafe ie can result in database corruption and SQLITENINGSERVER should be used instead ?

I am confused as to :

1. whether to use sqlitening server in all client server situations ?
2. whether to use LOCAL mode for multiple client/server access in a network with few users and no routers ?

Best Regards,
John Lever

JoeByrne

John,

I've done it both ways and generally speaking, if I know there will be only 2-4 people possibly accessing the database at any given time (the same 2-4 people) then I normally install the database on a 'Windows Share' folder, hopefully on a PC that will always be on (at least during 'business hours').

However, if there is a possibility more people will need the application, or more PCs will be accessing the database, or I want to be able to access the database across a WAN connection (such as the Internet) then the Client/Server model is the best approach.  The server component adds a (very) slight overhead, but you can be assured of data integrity more this way.

All in all though, I can't say that I've personally seen a problem with corrupted SQLite databases.  Admittedly, I haven't done more than a couple 2-3 apps in shared mode.

Fred Meier

I agree with Joe on when to use local/remote. 

You also questioned how to do local/remote.  Use the slConnect command to
do remote.  To run local just omit the command or set the Server parm to
$NUL.  All other coding is the same. 

David Kenny

May 06, 2009, 05:25:33 pm #3 Last Edit: May 12, 2009, 11:28:15 am by David Kenny
John,

I find no reference to routers in the documentation.  And I can't see what routers would have to do with this topic. Could you rephrase your statements that refer to routers or go into more detail about your situation?  I just feel there are perhaps some terminology differences interfering with our ability to analyze your questions.

Client/server means that you have one or more clients sending requests to a server, and the server then responding to those requests. In this context "server" refers to  a program that accepts requests, processes them, and then replies with some results, to the "client" (a separate program that sends the requests). Not "server" as in a dedicated computer on a network. In this case the "server" accesses the database for the "client or clients" in a way that protects the database from corruption.

"Local mode" means that a program is accessing the database directly.  It can be accessing a database on a network share, or on a local drive.  But the important part is that the program is directly accessing the database, not asking a server to do it.  So "use LOCAL mode for multiple client/server access" doesn't make sense.  Joe and Fred were saying that having 2-4 people accessing a in local mode should be ok.  I agree to a point.  But it does make a difference how you are accessing it.  Entering data manually by a few people lowers the risk of any two people changing the database at any given time.  The more clients, the more that chance goes up. On the other hand, I might write a program that gathers information from a machine and stores tens of thousands of records at a time. I wouldn't want even two users running that program at the same time against a "local" DB. I would use a client/server solution in that case.

So, besides adding a call to slConnect in your program, you will also have to have "installed" the server and "started" it (using SQLiteningServerAdmin.Exe as outlined in the documentation). The "client" program that you write will need to tell slConnect the IP address, or computer name of the machine, or the "server", you ran SQLiteningServerAdmin.Exe on.

Best regards,

David