LetoDBF

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

LetoDBF

Post by mol »

Hi guys!
Do you have any experience with LetoDBF?
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: LetoDBF

Post by serge_girard »

No, not yet!

Serge
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: LetoDBF

Post by mol »

I still have no time to study this :-(
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: LetoDBF

Post by trmpluym »

Yes, what do you want to know ?
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: LetoDBF

Post 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 !
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: LetoDBF

Post 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.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: LetoDBF

Post 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.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: LetoDBF

Post 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?
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: LetoDBF

Post by serge_girard »

No, not yet into LetoDB... !

Serge
There's nothing you can do that can't be done...
Post Reply