Page 1 of 4

LetoDBF

Posted: Thu Mar 29, 2018 6:01 pm
by mol
Hi guys!
Do you have any experience with LetoDBF?

Re: LetoDBF

Posted: Thu Mar 29, 2018 8:21 pm
by serge_girard
No, not yet!

Serge

Re: LetoDBF

Posted: Thu Mar 29, 2018 8:51 pm
by mol
I still have no time to study this :-(

Re: LetoDBF

Posted: Thu Mar 29, 2018 9:09 pm
by trmpluym
Yes, what do you want to know ?

Re: LetoDBF

Posted: Fri Mar 30, 2018 4:59 pm
by mol
How to start to use it.

Re: LetoDBF

Posted: Sat Mar 31, 2018 1:43 am
by trmpluym
Mol,

Here a a quick start:

Download the sources and the binaries from:

http://www.kresin.ru/en/letodb.html

Put letodb.exe and letodb.ini in a folder and Install the service by opening an elevated CMD prompt and type:

letodb.exe install

Start the LetoDb service ( start -> run -> services.msc )

LetoDb uses TCP port 2812 by default. If you want to connect the LetoDB server from a remote computer, open the TCP port 2812 in the firewall for incoming traffic. If you prefer another TCP port you can edit the letodb.ini file.

Copy the source files in a folder ( for example c:\hmg.3.4.4\letodb )

Build the library with the batch file below:

Code: Select all

@echo off
SET HMGPATH=\hmg.3.4.4
SET PATH=%HMGPATH%\harbour\bin;%HMGPATH%\mingw\bin;%PATH%
hbmk2 leto.hbp -i%hmgpath%\include -iinc
hbmk2 rddleto.hbp -i%hmgpath%\include -iinc
copy c:\hmg.3.4.4\letodb\lib\libleto.a c:\hmg.3.4.4\lib\libleto.a
copy c:\hmg.3.4.4\letodb\lib\librddleto.a c:\hmg.3.4.4\lib\librddleto.a
pause
Using LetoDB in your PRG is simple:

The DBF files need to be placed in the folder of LetoDb.exe (or change the path in LetoDb.ini).

Here some code using an existing database TEST.DBF:

Code: Select all

cLetoServerPath="//192.168.1.1:2812/"     // 192.168.1.1 is the IP of the pc running the service, 2812 is the default LetoDB TCP/IP port
REQUEST LETO  
RDDSETDEFAULT( "LETO" )
USE ( cLetoServerPath+"Test" ) New Shared INDEX ( cLetoServerPath+"Test" ) VIA "LETO"
Keep in mind to include the libraries in your .hbc file when compiling, by adding the lines:

libs=rddleto
libs=leto

You can keep the rest of your PRG almost 100% the same !

Re: LetoDBF

Posted: Sat Mar 31, 2018 6:24 am
by mol
Wow!
It looks amazing!
Last problems with Samba protocol cause to search different solution.
I've rebuild one of my apps with netio, but it requires a lot of changes in sources.

Re: LetoDBF

Posted: Tue Apr 03, 2018 7:05 pm
by mol
With view changes in my application it looks really great!
I'm testing with W7Prof as server and W10Pro as client.
Speed does not difference as using shared folders and SAMBA protocol.
I'll try to invert client and server.

Re: LetoDBF

Posted: Wed Apr 04, 2018 1:29 pm
by mol
There is a bug in LetoDB by Kresin.
When I open few indexes to one table in one instance of application, second application can not open these indexes - no errors, but it's always opened last.
Eg.
Table client
index files:
client1 order ClientId
client2 order ClientName
client3 order TaxId

on first instance:
IndexKey(1) returns "ClientId"
IndexKey(2) returns "ClientName"
IndexKey(3) returns "TaxId"

on first instance:
IndexKey(1) returns "TaxId"
IndexKey(2) returns "TaxId"
IndexKey(3) returns "TaxId"


Has anybody any idea what's going on?

Re: LetoDBF

Posted: Wed Apr 04, 2018 1:33 pm
by serge_girard
No, not yet into LetoDB... !

Serge