@Lacak2
1. I use the LNet components version 0.6.2 which works well on WinCE - using a TLTCPComponent.
2. My Server side application is also a program (currently Delphi) that listens for mobile clients to connect on TCP ports. Once they connect, the server program then runs queries against the SQL server, and the data is passed back to the mobile clients as a data stream with the necessary field names & types. My server application is actually a control program that dynamically assigns tasks to people working in a warehouse, so it is not purely used to transfer SQL data. Data is currently sent as text comma delimited strings - Once the entire project is nearly done, I'll compress and encrypt the data before transmission over IP. LNet can cater for the encryption as well.
It sort of works like this:
A user scans a tag containing his login information using an MC9000
The MC9000 connects to the server application & verifies the user's credentials.
Then the server application queries SQL to see when last that specific MC9000 had connected.
If database structures on the server had changed, the server sends the MC9000 a notification that it must clear it's own tables, otherwise it tells the MC9000 to expect only a subset of changed data since last logon.
The data is sent something like this:
Server -> MC9000: EXPECT DATA TABLE BINS WITH 20 RECORDS
MC9000 -> Server: OK - SEND DATA
Server -> MC9000: FIELD DEFINITION "BinID" Integer
Server -> MC9000: FIELD DEFINITION "BinName" STRING 30
Server -> MC9000: FIELD DEFINITION "BinContents" STRING 30
etc... (the MC9000 then uses this to create the table)
Server -> MC9000: DATA START
MC9000 Then saves the table definitions & opens the dataset.
Server -> MC9000: 1,"Bin A1","empty",...
Server -> MC9000: 2,"Bin A2","Product A",...
...
Server -> MC9000: 200,"Bin J20","Product ZZ"
The MC9000 loads each record into the table as it is received.
If all went well , the MC9000 -> server: "OK" otherwise "RESEND" / "ABORT" etc.
Then the rest of the application continues depending on tasks that were assigned to the operator from the control program, with continuous communication between the server, the MC9000, and some other PC-Based applications.
One function on my server listens for "SQL Requests" from the MC9000s e.g. the MC9000 can send the following to the server:
REQUEST SQL "UPDATE bins SET Product='Product Z' WHERE Bins.BinID=2"
The server the strips the "REQUEST SQL " part from the data received from the MC9000 and executes the actual sql code against the sql database, and then returns the result to the MC9000.
This request can then also be broadcast in the background to the other mobile units to keep their data in sync dynamically.