LetoDbf fork uploaded

2,650 views
Skip to first unread message

elch

unread,
Nov 30, 2016, 11:37:28 AM11/30/16
to Harbour Users

Hi,


i've just uploaded my LetoDBf fork to GIT:

https://github.com/elchs/LetoDBf


After many many months of work i feel it ready enough to post it.

i tried to adress any reported problem or feature wish over the last two years -- and sure, added my own needs and ideas.


The most important: you cannot mix that version with LetoDB, aka you have to recompile your app for LetoDBf server.


Ignore the Changelog, i have not written down my chronology of changes, something that i want to change in future ;-)

A look into README.md and Readme.txt should answer first questions.


Highlights maybe:

share- and lockable HbMemIO tables, client thread safetyness, a two-socket communication with 'delayed error system' ;-), ...


TlDr:

hbmk2 letodb

hbmk2 rddletoaddon

hbmk2 yourapp letodb.hbc


wish much fun

Rolf

Sami Laham

unread,
Nov 30, 2016, 12:42:19 PM11/30/16
to Harbour Users
Hi Rolf!!!

Thanks for share it :)

Congratulations 


Sami


Enrique Cabrerizo

unread,
Nov 30, 2016, 1:00:12 PM11/30/16
to harbou...@googlegroups.com
Thanks
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mario H. Sabado

unread,
Nov 30, 2016, 3:53:37 PM11/30/16
to harbou...@googlegroups.com

Many thanks for sharing your work Rolf! This is very much appreciated.

Regards,
Mario


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-users+unsubscribe@googlegroups.com.

Nenad Batoćanin

unread,
Nov 30, 2016, 10:47:18 PM11/30/16
to Harbour Users
Hello Rolf!

I am very glad that you decided to go public. I wish you a lot of users :)

Regards, NB


Ash

unread,
Dec 1, 2016, 6:30:51 AM12/1/16
to Harbour Users
Thank you so much Rolf.

Ash

bpd...@apollo.co.in

unread,
Dec 1, 2016, 11:35:50 PM12/1/16
to Harbour Users
Many thanks for sharing your work Rolf! This is very much appreciated.

Sami Laham

unread,
Dec 2, 2016, 8:48:24 AM12/2/16
to Harbour Users
Hi Rolf, i try to make leto and  receive some warning messages, it is ok


to make leto i use
 
hbmk2 letodb.hbp >> letodb.log 2>&1

follow the log

gcc (i686-posix-sjlj-rev1, Built by MinGW-W64 project) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Harbour 3.2.0dev (r1610281029)
Copyright (c) 1999-2016, http://harbour-project.org/

Harbour Build Info
---------------------------
Version: Harbour 3.2.0dev (r1610281029)
Compiler: MinGW GNU C 6.2 (32-bit)
Platform: Windows XP 5.1.2600 Service Pack 3
PCode version: 0.3
ChangeLog last entry: 2016-10-28 12:29 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
ChangeLog ID: 9a5fdaa8923dbaae7c9bd20b05e444582521b6c7
Built on: Nov  4 2016 11:20:22
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
---------------------------


hbmk2: Processando op‡äes do ambiente: -plat=win
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/errint.c: In function 'hb_errInternal':
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/errint.c:103:13: warning: null pointer dereference [-Wnull-dereference]
       *pGPF = 0;
       ~~~~~~^~~
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c: In function 'leto_Goto':
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c:7199:4: warning: 'ulLen' may be used uninitialized in this function [-Wmaybe-uninitialized]
    leto_SendAnswer( pUStru, pData, ulLen );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c: In function 'leto_TransNoSort':
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c:10913:31: warning: potential null pointer dereference [-Wnull-dereference]
             HB_ULONG  ulLen = leto_recLen( pAStruDst->pTStru );
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c:10913:31: warning: potential null pointer dereference [-Wnull-dereference]
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c:10913:31: warning: potential null pointer dereference [-Wnull-dereference]
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c: In function 'leto_CloseT':
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c:9180:10: warning: null pointer dereference [-Wnull-dereference]
          leto_wUsLog( pUStru, -1, "DEBUG! leto_CloseT area (%lu) %s not found, developer error",
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       pAStru->ulAreaID, pAStru->szAlias );
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c: In function 'leto_UdfDbf':
../../../../../DEVEL/hb32/addons/LetoDBf/source/server/letofunc.c:11166:47: warning: null pointer dereference [-Wnull-dereference]
                if( ! ( s_bNoSaveWA && ! pAStru->pTStru->bMemIO ) )
                                         ~~~~~~^~~~~~~~


to make rddleto i use

hbmk2 rddleto.hbp >> rddleto.log 2>&1

'hbmk2' nÆo ‚ reconhecido como um comando interno
ou externo, um programa oper vel ou um arquivo em lotes.
hbmk2: Processando op‡äes do ambiente: -plat=win
hbmk2: Harbour: Compilando m¢dulos...
hbmk2: Compilando...
../../../../source/client/letocl.c: In function 'LetoDbCloseTable':
../../../../source/client/letocl.c:3377:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fTransActive )
        ~~~~~~~~~~~^~~~~~~~~~~~~~
../../../../source/client/letocl.c: In function 'LetoDbGetMemo':
../../../../source/client/letocl.c:1234:24: warning: potential null pointer dereference [-Wnull-dereference]
    pConnection->iError = 0;
    ~~~~~~~~~~~~~~~~~~~~^~~
../../../../source/client/letocl.c: In function 'LetoDbRecCount':
../../../../source/client/letocl.c:3658:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fRefreshCount || ! pTable->ulRecCount )
        ~~~~~~~~~~~^~~~~~~~~~~~~~~
../../../../source/client/letocl.c: In function 'LetoDbCommit':
../../../../source/client/letocl.c:4000:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fTransActive )
        ~~~~~~~~~~~^~~~~~~~~~~~~~
../../../../source/client/letocl.c: In function 'LetoDbIsRecLocked':
../../../../source/client/letocl.c:4356:24: warning: potential null pointer dereference [-Wnull-dereference]
    pConnection->iError = 0;
    ~~~~~~~~~~~~~~~~~~~~^~~
../../../../source/client/letocl.c: In function 'LetoDbRecUnLock':
../../../../source/client/letocl.c:4417:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fTransActive )
        ~~~~~~~~~~~^~~~~~~~~~~~~~
../../../../source/client/letocl.c: In function 'LetoDbFileUnLock':
../../../../source/client/letocl.c:4468:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fTransActive )
        ~~~~~~~~~~~^~~~~~~~~~~~~~
../../../../source/client/letocl.c: In function 'LetoDbPack':
../../../../source/client/letocl.c:4496:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fTransActive || pTable->fReadonly || pTable->fShared )
        ~~~~~~~~~~~^~~~~~~~~~~~~~
../../../../source/client/letocl.c: In function 'LetoDbZap':
../../../../source/client/letocl.c:4515:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fTransActive || pTable->fReadonly || pTable->fShared )
        ~~~~~~~~~~~^~~~~~~~~~~~~~
../../../../source/client/letocl.c: In function 'LetoDbReindex':
../../../../source/client/letocl.c:4534:19: warning: potential null pointer dereference [-Wnull-dereference]
    if( pConnection->fTransActive || pTable->fReadonly || pTable->fShared )
        ~~~~~~~~~~~^~~~~~~~~~~~~~
../../../../source/client/letomgmn.c: In function 'HB_FUN_LETO_VARSET':
../../../../source/client/letomgmn.c:1511:17: warning: null pointer dereference [-Wnull-dereference]
             ptr = *pRetValue;
             ~~~~^~~~~~~~~~~~
hbmk2: Criando biblioteca est ticas... lib\librddleto.a







Tia

Sami


elch

unread,
Dec 2, 2016, 9:47:13 AM12/2/16
to Harbour Users
Hi Sami,

this line here is the cause:

          leto_wUsLog( pUStru, -1, "DEBUG! leto_CloseT area (%lu) %s not found, developer error",

You tried to close a workarea, which is not open ?

I will soon fix that, that the server crashes with the try, to report you the ALIAS, which is really! very empty :-)
A common RTE at client shell appear.

Thanks for report.

regards
Rolf

Sami Laham

unread,
Dec 2, 2016, 10:23:49 AM12/2/16
to Harbour Users

You tried to close a workarea, which is not open ?

No, only i used -> hbmk2 letodb.hbp   to make a letodb.exe and i receive the warnings messages above

I can wait, dont worry :)

Regards

Sami

elch

unread,
Dec 2, 2016, 10:27:08 AM12/2/16
to Harbour Users
well, Sami


You tried to close a workarea, which is not open ?

No, only i used -> hbmk2 letodb.hbp   to make a letodb.exe and i receive the warnings messages above
 
good compiler !!! -- saw an error before it happened. FIXED.

regards
Rolf

elch

unread,
Dec 2, 2016, 10:32:29 AM12/2/16
to Harbour Users
well again, Sami

the other *warnings* i will also fix soon.


No, only i used -> hbmk2 letodb.hbp   to make a letodb.exe and i receive the warnings messages above
 
best regards
Rolf

elch

unread,
Dec 2, 2016, 12:35:42 PM12/2/16
to Harbour Users

Hi to all,


please report also compiler warnings, as i dislike them to have ;-)

I've tried so far myself:

BCC5.5 :-), MsVc8?, two older 32+64bit MinGw, GCC4.6, clang 3.8


Sami, you may try again.

What was an still undetected bug i fixed, if there are still warnings report them but you can 'proceed'.


Thanks

Rolf

Francesco Perillo

unread,
Dec 2, 2016, 12:39:01 PM12/2/16
to harbou...@googlegroups.com
You should have some mac user compile it... the compiler reports a lot of diferent errors than gcc...

--

a...@poswithlogic.com

unread,
Dec 2, 2016, 1:49:56 PM12/2/16
to Harbour Users
Hi Rolf,

Congratulations, Thanks a lot.
 
2 issues

1. opening same dbf in 2 workareas with different alias names gives an error.
2. my dbf with 90 fields crashes the server...

Best wishes,
Abe



On Wednesday, November 30, 2016 at 11:37:28 AM UTC-5, elch wrote:

elch

unread,
Dec 2, 2016, 2:13:31 PM12/2/16
to Harbour Users
Hi Abe,



1. opening same dbf in 2 workareas with different alias names gives an error.

the special case :-), change in letodb.ini for server:

No_Save_Wa = 1

then it shell work


 2. my dbf with 90 fields crashes the server...

Can you ZAP a copy of that DBF ( to empty it ), then zip-attach it please !


best regards

Rolf

elch

unread,
Dec 3, 2016, 9:37:44 AM12/3/16
to Harbour Users
Hi Abe


 2. my dbf with 90 fields crashes the server...

Can you ZAP a copy of that DBF ( to empty it ), then zip-attach it please !


fixed!! -- someone robbed me a zero ;-)

BTW, max 2047 fields - or 2048, i'm unsure ...

best regards
Rolf

elch

unread,
Dec 3, 2016, 10:34:02 AM12/3/16
to Harbour Users

Hi Francesco,


You should have some mac user compile it... the compiler reports a lot of diferent errors than gcc...

clang 3.8 in mode: pedantic is what the name deserves, sigh -- and i got it quiet.


---

If you did not! fill in the 2. param of DbUseArea( , cDriver, .. ),

it would be *2* lines for you to get a quick test of LetoDBf:

REQUEST LETO

leto_connect( "//IP[:port]/"

( see: tests/basic.prg for drag/drop )


Adaption of DataPath in letodb.ini,

set both: Share_tables/ No_Save_WA to '1' for simultanous 3rd party access.

Done!



###

Nenad,

you may check 'a bit' improved transaction performance, done extra for you ;-)


best Regards

Rolf

Nenad Batoćanin

unread,
Dec 3, 2016, 10:42:17 AM12/3/16
to Harbour Users
Thanks, I'll try for sure!

Regards, NB

Abe Buchinger

unread,
Dec 4, 2016, 11:33:35 AM12/4/16
to harbou...@googlegroups.com
 T
​hanks​ Rolf.

can you confirm that LBM_DBSETFILTERARRAY(
​ ​
ary )
​ 
actually works
​?
does not for me. no errors no log.
i did comment out all __BM before building.
i do have Allow_UDF = 1 in the ini file.

thanks
abe

elch

unread,
Dec 5, 2016, 12:29:44 AM12/5/16
to Harbour Users

to all,


update sources, made some tiny important fixes.


-----

Abe,

can you confirm that LBM_DBSETFILTERARRAY(
​ ​
ary )
​ 
actually works
​?

bevor you proceed mit rushmore index ( fixed ? ),

you should have also a look in readme, section 5.2, and also search for leto_VarGetCached.


LetoDBf should be capable of executing any filter *at server side*, they are named: optimized filter.

Then only valid records are send to the client.

Such filter is very fast! and in no way compareable to these,

when all records are send to client and then the client have to do the filtering work.

They are nice dynamical with the variable system and need no special index type ...


wish much fun

Rolf

Sami Laham

unread,
Dec 5, 2016, 6:16:49 AM12/5/16
to Harbour Users
Hi Rolf

 
    Sami, you may try again.


 gcc (i686-posix-sjlj-rev1, Built by MinGW-W64 project) 6.2.0

Harbour Build Info
---------------------------
Version: Harbour 3.2.0dev (r1610281029)
Compiler: MinGW GNU C 6.2 (32-bit)
Platform: Windows XP 5.1.2600 Service Pack 3
PCode version: 0.3
ChangeLog last entry: 2016-10-28 12:29 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
ChangeLog ID: 9a5fdaa8923dbaae7c9bd20b05e444582521b6c7
Built on: Nov  4 2016 11:20:22
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
---------------------------


Only one in letodb.


    hbmk2: Processando op‡äes do ambiente: -plat=win
    ../../../../../DEVEL/hb32/addons/LetoDBf/source/server/errint.c: In function 'hb_errInternal':
    ../../../../../DEVEL/hb32/addons/LetoDBf/source/server/errint.c:110:13: warning: null pointer dereference [-Wnull-dereference]
           *pGPF = 0;
           ~~~~~~^~~
    
Rddleto no warnings.

Regards,

Sami

elch

unread,
Dec 5, 2016, 7:15:01 AM12/5/16
to Harbour Users
 
    ../../../../../DEVEL/hb32/addons/LetoDBf/source/server/errint.c: In function 'hb_errInternal':
    ../../../../../DEVEL/hb32/addons/LetoDBf/source/server/errint.c:110:13: warning: null pointer dereference [-Wnull-dereference]

That *was* an intentionally, forcible 'null pointer dereference':

click, crash, exit! -- to test that.

Very exactly what MinGw was detecting, inherited from Harbour, then LetoDB.


Just deleted ==> zero ! warning left For MinGw 6.2


WON, bingo!, \o/

Sami Laham

unread,
Dec 5, 2016, 12:17:32 PM12/5/16
to Harbour Users
Hi Rolf, tested in fresh h32 and hb34,  no warnings


gcc (i686-posix-sjlj-rev1, Built by MinGW-W64 project) 6.2.0

Version: Harbour 3.2.0dev (r1611161510)
ChangeLog last entry: 2016-11-16 16:10 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
ChangeLog ID: cd6ea6aec48ff45050af7678bece88f1057e3c20
Built on: Dec  5 2016 11:36:36

Build options: (Clipper 5.3b) (Clipper 5.x undoc)

Version: Harbour 3.4.0dev (c440edb) (2016-12-05 02:21)

Compiler: MinGW GNU C 6.2 (32-bit)
Platform: Windows XP 5.1 SP3
Commit info: 2016-12-05 03:21:38 +0100
Commit ID: c440edb

Thank you.

Sami

Message has been deleted

Klas Engwall

unread,
Dec 6, 2016, 9:20:39 AM12/6/16
to harbou...@googlegroups.com
Hi leon ravel,

Please think before posting and never ever post attachments of that size
in the group. It was 72 times larger than the 50KB size limit that the
Harbour-Users group netiquette allows.

Regards,
Klas


> Hi Rolf,
>
> Thanks for sharing your work.
> there are some errors :
>
> 1) I receive some warning messages (Microsoft Visual Studio 10.0) :
> - leto_win.c(261) : warning C4701: variable locale 'dwTimeout'
> potentiellement non initialisée utilisée
> - letocl.c(2260) : warning C4244: '=' : conversion de 'HB_ULONG' en
> 'HB_USHORT', perte possible de données
>
> 2) dbinfo( DBI_FULLPATH ) gives 127.0.0.1:2812/datas.meu instead of
> //127.0.0.1:2812/datas.meu
>
> 3) my dbf gives an error on index no 13 and crashes the server.
> runtime error :
> Code erreur 33: EG_DATATYPE
> Numero erreur 1021
> Categorie LETO
>
> best regards
> Ed
>
> ---------
>
> #include "dbinfo.ch"
>
> Proc main
> If Leto_Connect( "//127.0.0.1:2812/" )=-1
> Return
> Endif
>
> Leto_Dbdriver( "DBFCDX" ) /* to choose your DBF driver independent of
> the server default */
>
> xnamedbf="//127.0.0.1:2812/datas.meu"
> xnamecdx="//127.0.0.1:2812/datas.cdx"
>
> Leto_Ferase( xnamecdx )
> DbUseArea( .F. , "LETO" , xnamedbf , "alias_1" , .T. )
>
> // dbinfo( DBI_FULLPATH ) // gives 127.0.0.1:2812/datas.meu instead
> of //127.0.0.1:2812/datas.meu
>
> OrdCreate( xnamecdx , "TAG01" , "NUMEROCOM+TYPE_MOUVE" )
> OrdCreate( xnamecdx , "TAG02" ,
> "TYPE_MOUVE+MAG_VENTE+CODE_VENDE+DTOS(CTOD(DATE_CMDE))+NUMEROCOM" )
> OrdCreate( xnamecdx , "TAG03" , "CODE_ARTIC+IIF(TYPE_MOUVE $
> 'FCBXPW',IIF( ETAT_CMDE $ 'ER' .AND.
> VAL(QTE_CMDE)-VAL(QTE_LIVRE)>0,'2'+DTOS(CTOD(DATE_PREVU)),'3'+DTOS(CTOD(DATE_MOUVE))),'1'+DTOS(CTOD(DATE_MOUVE)))"
> )
> OrdCreate( xnamecdx , "TAG04" ,
> "CDE_MQ_CLI+CODE_ARTIC+DTOS(CTOD(DATE_MOUVE))" )
> OrdCreate( xnamecdx , "TAG05" ,
> "TYPE_MOUVE+MAG_VENTE+CODE_FOURN+NOM_MODELE+NOM_ELEMEN" )
> OrdCreate( xnamecdx , "TAG06" ,
> "TYPE_MOUVE+MAG_VENTE+DTOS(CTOD(DATE_CMDE))+NUMEROCOM" )
> OrdCreate( xnamecdx , "TAG07" , "CDE_MQ_CLI+CODE_ARTIC+TYPE_MOUVE" )
> OrdCreate( xnamecdx , "TAG08" ,
> "CODE_ARTIC+MAG_VENTE+DTOS(CTOD(DATE_MOUVE))" )
> OrdCreate( xnamecdx , "TAG09" , "CODE_ARTIC+DTOS(CTOD(DATE_MOUVE))" )
> OrdCreate( xnamecdx , "TAG10" ,
> "CODE_PROSP+DTOS(CTOD(DATE_CMDE))+NUMEROCOM" )
> OrdCreate( xnamecdx , "TAG11" , "NUM_BONCIR+TYPE_MOUVE+CODE_ARTIC" )
> OrdCreate( xnamecdx , "TAG12" ,
> "NUMEROCOM+TYPE_MOUVE+NUM_RESERV+TYP_RESERV" )
>
> // error index 13
> OrdCreate( xnamecdx , "TAG13" ,
> "CODE_PROMO+MAG_VENTE+TYPE_MOUVE+DTOS(CTOD(DATE_CMDE))" )
>
> Return
>
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to harbour-user...@googlegroups.com
> <mailto:harbour-user...@googlegroups.com>.

Davor Siklic

unread,
Dec 6, 2016, 3:58:08 PM12/6/16
to harbou...@googlegroups.com

Hi

I try to compile on linux ubuntu...
there are log...

best regards
Davor Siklic
---
siki@siki:~/prg/LetoDBf$ uname -a
Linux siki 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
siki@siki:~/prg/LetoDBf$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:    xenial
siki@siki:~/prg/LetoDBf$ hbmk2 letodb
../../home/siki/prg/LetoDBf/source/server/leto_lnx.c: In function ‘HB_FUN_LETO_DAEMON’:
../../home/siki/prg/LetoDBf/source/server/leto_lnx.c:102:4: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result]
    ( void ) setuid( getuid() );
    ^
../../home/siki/prg/LetoDBf/source/server/leto_lnx.c:103:4: warning: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Wunused-result]
    ( void ) setgid( getgid() );
    ^
../../home/siki/prg/LetoDBf/source/server/leto_2.c:294:15: warning: ‘s_iGlobalExit’ is static but declared in inline function ‘leto_ExitGlobal’ which is not static
    static int s_iGlobalExit = 0;
               ^
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Reccount':
letofunc.c:(.text+0xa69): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Info':
letofunc.c:(.text+0x1c60): undefined reference to `ultostr'
letofunc.c:(.text+0x1cae): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_InitTable':
letofunc.c:(.text+0x1e82): undefined reference to `leto_hash'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Drop':
letofunc.c:(.text+0x3b03): undefined reference to `leto_hash'
letofunc.c:(.text+0x3dd9): undefined reference to `leto_hash'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_readServerLog':
letofunc.c:(.text+0x5ec6): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_wUsLog':
letofunc.c:(.text+0x62ac): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_IndexesInfo':
letofunc.c:(.text+0x727a): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_CreateTable':
letofunc.c:(.text+0x8eb6): undefined reference to `leto_hash'
letofunc.c:(.text+0x9492): undefined reference to `ultostr'
letofunc.c:(.text+0x9612): undefined reference to `ultostr'
letofunc.c:(.text+0x9883): undefined reference to `leto_hash'
letofunc.c:(.text+0x9952): undefined reference to `ultostr'
letofunc.c:(.text+0x99c3): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_UpdateRecMta':
letofunc.c:(.text+0xc6ae): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_UpdateRecAdd':
letofunc.c:(.text+0xcd5e): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Intro':
letofunc.c:(.text+0xe774): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Select.constprop.39':
letofunc.c:(.text+0xff31): undefined reference to `leto_hash'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Mgmt':
letofunc.c:(.text+0x1218f): undefined reference to `ultostr'
letofunc.c:(.text+0x121a4): undefined reference to `ultostr'
letofunc.c:(.text+0x121b9): undefined reference to `ultostr'
letofunc.c:(.text+0x121ce): undefined reference to `ultostr'
letofunc.c:(.text+0x12a8d): undefined reference to `leto_hash'
letofunc.c:(.text+0x13319): undefined reference to `leto_hash'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `HB_FUN_LETO_MAKEALIAS':
letofunc.c:(.text+0x15d6b): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `HB_FUN_LETO_ALIAS':
letofunc.c:(.text+0x16c49): undefined reference to `leto_hash'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `HB_FUN_LETO_AREAID':
letofunc.c:(.text+0x16d91): undefined reference to `leto_hash'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_OpenTable':
letofunc.c:(.text+0x1763f): undefined reference to `ultostr'
letofunc.c:(.text+0x177e5): undefined reference to `leto_hash'
letofunc.c:(.text+0x17901): undefined reference to `leto_hash'
letofunc.c:(.text+0x17c9c): undefined reference to `ultostr'
letofunc.c:(.text+0x17f77): undefined reference to `leto_hash'
letofunc.c:(.text+0x18053): undefined reference to `ultostr'
letofunc.c:(.text+0x180c5): undefined reference to `ultostr'
letofunc.c:(.text+0x18763): undefined reference to `leto_hash'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Ordfunc':
letofunc.c:(.text+0x19017): undefined reference to `ultostr'
letofunc.c:(.text+0x19828): undefined reference to `ultostr'
/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_PingForZombies':
letofunc.c:(.text+0x1d1ea): undefined reference to `leto_ExitGlobal'
collect2: error: ld returned 1 exit status
hbmk2[letodb]: Error: Running linker. 1
gcc '/tmp/hbmk_9dcg97.dir/server.o' '/tmp/hbmk_9dcg97.dir/errorsys.o' '/tmp/hbmk_9dcg97.dir/common.o' '/tmp/hbmk_9dcg97.dir/errint.o' '/tmp/hbmk_9dcg97.dir/leto_lnx.o' '/tmp/hbmk_9dcg97.dir/letoacc.o' '/tmp/hbmk_9dcg97.dir/letovars.o' '/tmp/hbmk_9dcg97.dir/letofunc.o' '/tmp/hbmk_9dcg97.dir/letolist.o' '/tmp/hbmk_9dcg97.dir/leto_2.o' '/tmp/hbmk_9dcg97.dir/blowfish.o' '/tmp/hbmk_9dcg97.dir/common_c.o' '/tmp/hbmk_9dcg97.dir/lz4.o' '/tmp/hbmk_9dcg97.dir/lz4net.o' '/tmp/hbmk_9dcg97.dir/PMurHash.o' '/tmp/hbmk_9dcg97.dir/hbmk_tytylo.o'   -Wl,--start-group -lhbmemio -lhbct -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgttrm -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lm -lpthread -ldl -lrt -lz -lhbpcre   -Wl,--end-group -s -obin/letodb -L/opt/clip/harbour/lib/linux/gcc

hbmk2: Error: Referenced, missing, but unknown function(s): LETO_MAKEALIAS(),
       LETO_ALIAS(), LETO_AREAID()
siki@siki:~/prg/LetoDBf$


Dne 30.11.2016 v 17:37 'elch' via Harbour Users napsal(a):

Hi,

i've just uploaded my LetoDBf fork to GIT:

https://github.com/elchs/LetoDBf

After many many months of work i feel it ready enough to post it.

i tried to adress any reported problem or feature wish over the last two years -- and sure, added my own needs and ideas.

The most important: you cannot mix that version with LetoDB, aka you have to recompile your app for LetoDBf server.

Ignore the Changelog, i have not written down my chronology of changes, something that i want to change in future ;-)

A look into README.md and Readme.txt should answer first questions.

Highlights maybe:

share- and lockable HbMemIO tables, client thread safetyness, a two-socket communication with 'delayed error system' ;-), ...

TlDr:

hbmk2 letodb

hbmk2 rddletoaddon

hbmk2 yourapp letodb.hbc

wish much fun

Rolf

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

leon ravel

unread,
Dec 6, 2016, 5:52:35 PM12/6/16
to Harbour Users
Hi Klas,
Excuse me, this is my first message and I did not know it.
How do I send a file ?
Regards,

Klas Engwall

unread,
Dec 6, 2016, 8:07:42 PM12/6/16
to harbou...@googlegroups.com
Hi leon ravel,

First of all, talk to the person you want to send it to and discuss how
to do it. Most of the time there is no need to send files like that to
the mailboxes of a thousand people who are not really involved.

Regards,
Klas

elch

unread,
Dec 7, 2016, 7:19:08 AM12/7/16
to Harbour Users
Hi Ed,

as already told by Klas, if there is a need to send me something, ask before.
Then i like to instruct you what is needed.

*Never ever* PRIVATE data shell be needed.
The first action i have extra to do was to: ZAP the 165 MB monster.

---

1) I receive some warning messages (Microsoft Visual Studio 10.0) :
    -  leto_win.c(261) : warning C4701: variable locale 'dwTimeout' potentiellement non initialisée utilisée
shell be fixed.
    -  letocl.c(2260) : warning C4244: '=' : conversion de 'HB_ULONG' en 'HB_USHORT', perte possible de données
this we must test again!, as the lines meanwhile have changed.


----
2) dbinfo( DBI_FULLPATH ) gives 127.0.0.1:2812/datas.meu  instead of //127.0.0.1:2812/datas.meu
That is correct, no change: trailing 'path separators' are removed.

You neglect the concept:
after a Leto_Connect(), we use plain and portable filenames ( plus possible paths ),
but without that IP-address part.
So the source can be used without LetoDBf, maybe with hbNetIO, or as local running app.

Example in your case:
xnamedbf="//127.0.0.1:2812/datas.meu"  ==> xnamedbf="DATAS.MEU"
[ Linux is case sensitive about file names :-) ]

 
3) my dbf gives an error on index no 13 and crashes the server.
FIXED -- so far.
Will check later how this miscalculation came on plan, and if formula is now correct.

regards
Rolf

elch

unread,
Dec 7, 2016, 7:37:00 AM12/7/16
to Harbour Users
correction, Leon Ravel, aka Ed,


2) dbinfo( DBI_FULLPATH ) gives 127.0.0.1:2812/datas.meu  instead of //127.0.0.1:2812/datas.meu
That is correct, no change: trailing 'path separators' are removed.

*leading*, not trailing -- my english ;-(
and all leading '/' or '\':
"///\\\//datas.meu" => "datas.meu"

Rolf

elch

unread,
Dec 7, 2016, 8:07:09 AM12/7/16
to Harbour Users
Hi Davor,

Linux siki 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

siki@siki:~/prg/LetoDBf$ hbmk2 letodb
../../home/siki/prg/LetoDBf/source/server/leto_lnx.c:102:4: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result]
../../home/siki/prg/LetoDBf/source/server/leto_lnx.c:103:4: warning: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Wunused-result]
../../home/siki/prg/LetoDBf/source/server/leto_2.c:294:15: warning: ‘s_iGlobalExit’ is static but declared in inline function ‘leto_ExitGlobal’ which is not static
these three warnings are so far correct detected, the last one i like to change in near future.

/tmp/hbmk_9dcg97.dir/letofunc.o: In function `leto_Reccount':
letofunc.c:(.text+0xa69): undefined reference to `ultostr'
...

hbmk2[letodb]: Error: Running linker. 1
gcc ....
This C-compiler gcc version seem to have a serious problem with 'inlining' functions.

Please tell me the:
gcc --version

I have to deeper check how to work against it.

best regards
Rolf

Davor Siklic

unread,
Dec 7, 2016, 9:54:34 AM12/7/16
to harbou...@googlegroups.com

gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Dne 7.12.2016 v 14:07 'elch' via Harbour Users napsal(a):
> gcc --version

Best regards
Davor

elch

unread,
Dec 7, 2016, 11:03:22 AM12/7/16
to Harbour Users
Hi Davor,


gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
still the same as in Ubu 12.04 LTS.

I just removed my 'gameplay' -- download again, shell compile now.

best regards
Rolf

elch

unread,
Dec 7, 2016, 4:41:12 PM12/7/16
to Harbour Users
Hi,


Hi Rolf, tested in fresh h32 and hb34,  no warnings

better than to have no compiler warnings is to have this Valgrind report,

related to client lib and server itself, for the parts intensively tested:

---

HEAP SUMMARY:

in use at exit: 0 bytes in 0 blocks

All heap blocks were freed -- no leaks are possible


ERROR SUMMARY:

0 errors from 0 contexts (suppressed: 0 from 0)

---


In my words: no unmaintained even single byte was found.

My expectation: if it runs, it will run for long time.

The both up now reported server crashes were not by chance, but caused by too

less calculated RAM to allocate -- happened with first try, and fixed them.



### Performance:

the bottleneck for the server is the network itself, else it would be faster.

So if you have a 10 GBit network, LetoDBf will serve faster as for 1 GBit, but

not 10 times :-)


Some results for:

120 000 records, 101 bytes record length, one memo field


classic append, all fields set: 18 s ~ 6500 / s

transaction encapsulated append: < 2 s ~ 65 000 / s

skip top to bottom, change 2 fields

- with one FLock: 5 s

- with RLock/ DbUnlock: 18 s

skip top to bottom to collect/ sum a field content: ~ 1 s


With temporary adjusting the default value for the skip-buffer, plus using

traffic compression, it shell be possible to skip through ~ half a million

records per second.


Above is not significant faster for hbMemIO tables, cause the network limit,

and max request rate ( ping -> pong ) is ~ 10K / s for 1 GBit.



###

check from time to time, if new source is available -- update best to last version.


BTW, i have added variable type: "A" == array to the list of possible type for the leto_Var*() system.


stay tuned

elch

Davor Siklic

unread,
Dec 8, 2016, 8:08:36 PM12/8/16
to harbou...@googlegroups.com

Yeah, but... ;-)

siki@siki:~/prg/LetoDBf$ hbmk2 letodbsvc.hbp
../../home/siki/prg/LetoDBf/source/server/letofunc.c: In function ‘leto_dbfCopy’:
../../home/siki/prg/LetoDBf/source/server/letofunc.c:5363:4: warning: ‘errCode’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hb_fsSetFError( errCode );
    ^
/tmp/hbmk_hjvd9j.dir/lz4net.o: In function `hb_lz4netClose':
lz4net.c:(.text+0x1f0): multiple definition of `hb_lz4netClose'
/tmp/hbmk_hjvd9j.dir/lz4net.o:lz4net.c:(.text+0x1f0): first defined here
/tmp/hbmk_hjvd9j.dir/lz4net.o: In function `hb_lz4netOpen':
lz4net.c:(.text+0x250): multiple definition of `hb_lz4netOpen'
/tmp/hbmk_hjvd9j.dir/lz4net.o:lz4net.c:(.text+0x250): first defined here
/tmp/hbmk_hjvd9j.dir/lz4net.o: In function `hb_lz4netEncryptKey':
lz4net.c:(.text+0x2c0): multiple definition of `hb_lz4netEncryptKey'
/tmp/hbmk_hjvd9j.dir/lz4net.o:lz4net.c:(.text+0x2c0): first defined here
/tmp/hbmk_hjvd9j.dir/lz4net.o: In function `hb_lz4netEncryptTest':
lz4net.c:(.text+0x310): multiple definition of `hb_lz4netEncryptTest'
/tmp/hbmk_hjvd9j.dir/lz4net.o:lz4net.c:(.text+0x310): first defined here
/tmp/hbmk_hjvd9j.dir/lz4net.o: In function `hb_lz4netEncrypt':
lz4net.c:(.text+0x350): multiple definition of `hb_lz4netEncrypt'
/tmp/hbmk_hjvd9j.dir/lz4net.o:lz4net.c:(.text+0x350): first defined here
/tmp/hbmk_hjvd9j.dir/lz4net.o: In function `hb_lz4netDecrypt':
lz4net.c:(.text+0x620): multiple definition of `hb_lz4netDecrypt'
/tmp/hbmk_hjvd9j.dir/lz4net.o:lz4net.c:(.text+0x620): first defined here


collect2: error: ld returned 1 exit status

hbmk2[letodbsvc]: Error: Running linker. 1
gcc '/tmp/hbmk_hjvd9j.dir/server.o' '/tmp/hbmk_hjvd9j.dir/errorsys.o' '/tmp/hbmk_hjvd9j.dir/common.o' '/tmp/hbmk_hjvd9j.dir/errint.o' '/tmp/hbmk_hjvd9j.dir/leto_lnx.o' '/tmp/hbmk_hjvd9j.dir/letoacc.o' '/tmp/hbmk_hjvd9j.dir/letovars.o' '/tmp/hbmk_hjvd9j.dir/letofunc.o' '/tmp/hbmk_hjvd9j.dir/letolist.o' '/tmp/hbmk_hjvd9j.dir/leto_2.o' '/tmp/hbmk_hjvd9j.dir/blowfish.o' '/tmp/hbmk_hjvd9j.dir/common_c.o' '/tmp/hbmk_hjvd9j.dir/lz4net.o' '/tmp/hbmk_hjvd9j.dir/lz4.o' '/tmp/hbmk_hjvd9j.dir/lz4net.o' '/tmp/hbmk_hjvd9j.dir/PMurHash.o' '/tmp/hbmk_hjvd9j.dir/hbmk_rprx2m.o'   -Wl,--start-group -lhbmemio -lhbct -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgttrm -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lm -lpthread -ldl -lrt -lz -lhbpcre   -Wl,--end-group -s -obin/letodb -L/opt/clip/harbour/lib/linux/gcc



siki@siki:~/prg/LetoDBf$ hbmk2 letodbaddon.hbp
hbmk2: Compiling Harbour sources...
hbmk2: Compiling...
../../../../source/server/letofunc.c: In function ‘leto_dbfCopy’:
../../../../source/server/letofunc.c:5363:4: warning: ‘errCode’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    hb_fsSetFError( errCode );
    ^
hbmk2: Linking... bin/letodb
hbmk2[letodbaddon]: Warning: Copying bin/letodb.ini to /etc/letodb.ini failed
                    with 5.


best regards

Davor




Dne 7.12.2016 v 17:03 'elch' via Harbour Users napsal(a):

elch

unread,
Dec 9, 2016, 12:19:49 AM12/9/16
to Harbour Users
Hi Davor,

not <all> .hbps' are for you :-)

You will get less, the more you try ;-)



siki@siki:~/prg/LetoDBf$ hbmk2 letodbsvc.hbp

letodbsvc.hbp is for compile the server as "service" for Windovs.

But thanks for the hint!:

a double called file therein after recent wrong fix -- fixed for others.



siki@siki:~/prg/LetoDBf$ hbmk2 letodbaddon.hbp  

> hbmk2[letodbaddon]: Warning: Copying bin/letodb.ini to /etc/letodb.ini failed
 
this is for 'installing' the server -- needs root (sudo) rights.
As you need root rights, to modify settings in letodb.ini, if it is located in /etc.
This is, like i would advise to install the server -- but maybe better done manually ...

---
The remaining warning shell be fixed, that function is still unused.

best regards
Rolf

elch

unread,
Dec 9, 2016, 11:01:45 AM12/9/16
to Harbour Users
Hi Davor,

you are fully excused, this Readme.txt is a holy mess, grown over years.

Took me an hour to clean it a bit up, take another look into.
If questions are remaining, feel free to ask.

best regards
Rolf

Nenad Batoćanin

unread,
Dec 9, 2016, 10:11:29 PM12/9/16
to Harbour Users
Hello! 

I try LetoDBf with my app. I'm stuck in very simle operation. Something like this:

SELECT Test
WHILE TRUE
   IF ! FLock()
// some message, pause
   ELSE
     EXIT
   END IF
END DO

APPEND BLANK
Test->t_id := ...
Test->t_name := ...

Letodbf_00.log:

12.10 04:01:29.265 DEBUG leto_UpdateRecord() record lock failed !?
12.10 04:01:29.265 DEBUG leto_UpdateRecord() record lock failed !?

and App writes empty record to table Test. 

Regards, NB

elch

unread,
Dec 10, 2016, 5:11:10 AM12/10/16
to Harbour Users

Thanks!, Nenad


a medallion goes to one of the best test persons in world.

Highly complex game play ...
But how can i have overlooked this silly case.

Maybe i did not see the single tree,as i was mid in forest ?
Maybe better false to reject, as to wrongly to allow ?

improved it :-)


THANK YOU

Rolf

Message has been deleted

elch

unread,
Dec 10, 2016, 4:12:37 PM12/10/16
to Harbour Users
Hi,

not to be misunderstood:

my LetoDBf works fine, 24/7 reliable -- at least it is requirement and my aim :-)

Countercheck it like Nenad did,

very thanks again to him to let me find an remaining important bug.


I reported earlier about origin LetoDB 2.17-b3 misbehaviour.


A correction, in mode: Share_Tables = 0, nobody may notice the "misfeature".

But with Share_Tables = 1, you can watch this:


first user set Rlock() at record 2, writes something into a field

second user set a Flock() when at record 1, and immediate dbunlock(),

then first user for sure is astonished that his Rlock() is gone, no changes

are written with his DbUnlock(), instead in server logs can be find:

Lock required! and warning message shell pop up.


If this pair: Flock()/ DbUnlock()

happens in between another users pair: DbAppend()/ DBUNLOCK(),

you will get: Error Leto/1021 Data type error

with next DbAppend(), DbSkip(), .. -- and an empty ? record().


Cause of this: a 'special' designed file-unlock is needed,

plus Flock() generally have to respect Rlock().


best regards

Rolf



Am Samstag, 10. Dezember 2016 18:38:54 UTC+1 schrieb elch:
BTW Nenad and others,

with LetoDB you can Flock() even when another users have different records with a Rlock()
-- yours must be just another record than these from other users when doing that file lock.
Then you can dbskip or dbgoto to this record-locked and successful write there.

And both users won't notice something scary happening ...

( it won't work vice versa )

best regards

Rolf


Am Samstag, 10. Dezember 2016 04:11:29 UTC+1 schrieb Nenad Batoćanin:

Nenad Batoćanin

unread,
Dec 10, 2016, 8:12:52 PM12/10/16
to Harbour Users
Thank you, the credit goes to my very large program :)) 

In fact, this part of the program is as follows:

T_BEGIN
   T_SELECT ("Test")
   T_FLock ("Test)
   APPEND BLANK
   Test->t_id := ...
   Test->t_name := ...

So I "translate" this code to plain HB...

Regards, NB

Nenad Batoćanin

unread,
Dec 10, 2016, 8:22:00 PM12/10/16
to Harbour Users
Hmmmm, if I understand you correctly, this feature can make a problem in some cases. For example, flock() is something usefull as a kind of semaphore: when file iz f-locked, I am sure that no other user will be able to access (flock or rlock) the table. It is now possible.

Regards, NB


On Saturday, December 10, 2016 at 6:38:54 PM UTC+1, elch wrote:
BTW Nenad and others,

with LetoDB you can Flock() even when another users have different records with a Rlock()
-- yours must be just another record than these from other users when doing that file lock.
Then you can dbskip or dbgoto to this record-locked and successful write there.

And both users won't notice something scary happening ...

( it won't work vice versa )

best regards
Rolf


Am Samstag, 10. Dezember 2016 04:11:29 UTC+1 schrieb Nenad Batoćanin:

Nenad Batoćanin

unread,
Dec 10, 2016, 8:29:01 PM12/10/16
to Harbour Users
Thank you very much, I occasionally noticed such problems, it is quite possible that this is the bug that you described.

NB

leon ravel

unread,
Dec 11, 2016, 4:48:32 PM12/11/16
to Harbour Users
Hi Rolf,
thanks for your work and fixes.

leto_file, leto_direxist, leto_makedir, no longer work (windows 7)

In readme.txt, leto_direxist and leto_dirremove are not specified.

Thanks again for your work and your quick fixes

Best regards



//  letodb.ini
//  ; path to a data directory on a server;
//  DataPath = C:\MYERP\
//  EnableFileFunc = 1


nPort := 2812
cPath := "127.0.0.1"

cPath := "//" + cPath + IiF( ":" $ cPath, "", ":" + ALLTRIM( STR( nPort ) ) )
cPath += Iif( Right(cPath,1) == "/", "", "/" )

RDDSETDEFAULT( "LETO" )

xdbf="test1.dbf"

IF dbCreate( cPath + xdbf, { { "NAME",  "C", 10, 0 },;
                                { "NUM" ,  "N",  4, 0 },;
                                { "INFO",  "C", 32, 0 },;
                                { "DINFO", "D",  8, 0 },;
                                { "MINFO", "M", 10, 0 } } )
     ? "File has been created"
ENDIF

xdbf=cPath+"test1.dbf"
? xdbf , LETO_FILE( xdbf )                //  ->  .F.

xdbf=cPath+"\test1.dbf"
? xdbf , LETO_FILE( xdbf )                //  ->  .F.

? "C:\MYGESCOM\test1.dbf" , FILE( "C:\MYERP\test1.dbf" )                //  ->  .T.

elch

unread,
Dec 12, 2016, 8:25:42 AM12/12/16
to Harbour Users

Hi Leon,


you need a connection to the server, very recommended is the easy use of:

Leto_Connect( "//...:.../" ) very first at application start.


Take a fresh download,

go into directory "tests",

execute therein a: "buildall" or a: "hbmk2 test_file",

the loopback network shell work any time, so:


test_file 127.0.0.1


what does it report ?

( please, no ! black/white screenshot of that not rocket sience ;)


regards

Rolf



Am Sonntag, 11. Dezember 2016 22:48:32 UTC+1 schrieb leon ravel:
Hi Rolf,
thanks for your work and fixes.

leto_file, leto_direxist, leto_makedir, no longer work (windows 7)

In readme.txt, leto_direxist and leto_dirremove are not specified.

Thanks again for your work and your quick fixes

Best regards
 
...

leon ravel

unread,
Dec 12, 2016, 10:02:25 AM12/12/16
to Harbour Users
Hi Rolf,

There is a link error :

  rddleto.lib(letocl.obj) : error LNK2019: symbole externe non résolu _hb_xreallocz référencé dans la fonction _leto_AddTransList

regards
Leon

elch

unread,
Dec 12, 2016, 11:12:51 AM12/12/16
to Harbour Users
Hi Leon,

corrected it. Sorry!

leon ravel

unread,
Dec 12, 2016, 1:25:04 PM12/12/16
to Harbour Users
Hi Rolf,
Thanks for your quick fixes.
That works very well.
Best regards
Leon

leon ravel

unread,
Dec 13, 2016, 4:00:02 AM12/13/16
to Harbour Users
Hi Rolf,
How to initialize the server with set date, setd ate format, set epoch ? In dbleto.ini or otherwise?
Thanks.
Best regards
Leon

elch

unread,
Dec 13, 2016, 7:37:02 AM12/13/16
to Harbour Users
Hi Leon,


How to initialize the server with set date, setd ate format, set epoch ? In dbleto.ini or otherwise?

this shell be done in your sourcecode as you are used to do.

Because very down in DBF it is always the same.

It differs personally, how this is displayed and how the value you want to store must be evaluated


---

But you shell read section: 4.2.2 Codepage support

in the just some minutes ago updated Readme.txt.


best regards
Rolf

leon ravel

unread,
Dec 14, 2016, 11:16:38 AM12/14/16
to Harbour Users
Hi Rolf,
The order is not correct with the attached example.
Best regards
Leon

proc main

SET DATE FRENCH

RDDSETDEFAULT( "LETO" )

If Leto_Connect( "//127.0.0.1:2812/" )=-1
   Return
Endif

xdbf="//127.0.0.1:2812/datas.meu"
xcdx="//127.0.0.1:2812/datas.cdx"

If .not. dbCreate( xdbf , {  { "DATE_STRNG", "C",   8 , 0 },;
                                     { "NUME_RECNO", "N",  04 , 0 }  } )
   return
Endif

DbUseArea( .F. , "LETO" , xdbf , "alias_1" , .T. )

XDAT=DATE()-100
FOR I=1 TO 11
    APPEND BLANK
    REPLACE DATE_STRNG  WITH DTOC(XDAT)
    REPLACE NUME_RECNO  WITH RECNO()
   XDAT=XDAT+10
NEXT

OrdCreate( xcdx , "TAG01" , "DTOS(CTOD(DATE_STRNG))" )
OrdsetFocus( 1 )
GOTO TOP
set alternate to list.txt
FOR I=1 TO 11
   set alternate on
   ? NUME_RECNO , DATE_STRNG
   set alternate off
   SKIP
NEXT
close alternate
INKEY(0)
return

   2   15/09/16
   3   25/09/16
   5   15/10/16
   6   25/10/16
   8   14/11/16
   9   24/11/16
  11  14/12/16
   7   04/11/16
  10  04/12/16

Alain Aupeix

unread,
Dec 14, 2016, 12:16:22 PM12/14/16
to harbou...@googlegroups.com
Le 14/12/2016 à 17:16, leon ravel a écrit :
> Hi Rolf,
> The order is not correct with the attached example.
> Best regards
> Leon
>
> proc main
>
> SET DATE FRENCH
Hi,

Personnaly, I use :

set date format "yy/mm/dd"
or
set date japan

instead of

set date french
and I have no problem

Just an idea ...

A+
--
------------------------------------------------------------------------
Alain Aupeix
http://jujuland.pagesperso-orange.fr/
http://pissobi-lacassagne.pagesperso-orange.fr/
------------------------------------------------------------------------
U.buntu 12.04 | G.ramps 3.4.9-1 | H.arbour 3.2.0dev (2016-11-16 15:10) |
Hw.Gui 2.20-3 (2629)
------------------------------------------------------------------------

elch

unread,
Dec 15, 2016, 6:30:31 AM12/15/16
to Harbour Users

THANK you, Leon


If Leto_Connect( "//127.0.0.1:2812/" )=-1

one more again, you *can* do so,

but after connect to server no more an IPaddress:port in path for file is needed.

This will keep your sourcecode being *portable*.

==> xdbf="datas.meu"

==> xcdx="data.cdx"


If .not. dbCreate( xdbf , {  { "DATE_STRNG", "C",   8 , 0 },;
..
XDAT=DATE()-100
REPLACE DATE_STRNG  WITH DTOC(XDAT)

OrdCreate( xcdx , "TAG01" , "DTOS(CTOD(DATE_STRNG))" )
TIP:

storing a "DATE" as 8 character long "C"-value have disadvantages,

i recommend doing it as "D" value, to not loose the information about the century.

Then when you want to display at specic point in application a 4 digits long year for a date value,

you can easyly change temporary the dateformat setting.

Plus you spare one operation for each storing of the date [ DTOC() ]

and spare one operation for retrieving with CTOD()/ DTOS() especially in index key!

 

----
..

   9   24/11/16
  11  14/12/16
   7   04/11/16
  10  04/12/16

that was a !BUG!, THANKS for reporting.

Must have it broken the logog before initial upload to GIT, some times before it was working ... :-(


Formerly, the only place when new dateformat was transmitted to server during first establishing a connection.

NOW:

you will now find a note about CP and dateformat setting for new connections in letodbf.log.

Plus!, it will be checked with each open/ create table it setting meanwhile have changed.

That shell be thoroughly fixed, please verify.


thanks again

Rolf

leon ravel

unread,
Dec 15, 2016, 4:23:39 PM12/15/16
to Harbour Users
Hi Alain & Rolf,
Thank you for your answers and your ideas.

Rolf,
It works very well.
Great thanks for the improvements you've made to letodb and your very fast speed to fix bugs.

- Is LETO_GETLOCALIP () a function for the client ?
     IP address of client station under windows XP = 192.1.1.13
     LETO_GETLOCALIP()  return 192.1.1.11 (the server under windows 7) instead of 192.1.1.13

The following remarks are suggestions but not requests from me.

- How to do if the server has multiple directories or disks for the data?
  Datapath = c: \ abc
  Datapath = c: \ yyz

- Is there a function to copy any file from the server to a local disk of the client or the opposite ?

Best regards
Leon


elch

unread,
Dec 18, 2016, 9:15:06 PM12/18/16
to Harbour Users
Hi Leon,



- Is LETO_GETLOCALIP () a function for the client ?
now for both sides, got an optional param.


The following remarks are suggestions but not requests from me.
- How to do if the server has multiple directories or disks for the data?
  Datapath = c: \ abc
  Datapath = c: \ yyz

Working in 'the root directory' looks a bit like beginners style, especially if its the "C" drive ;-)


My main projects use a directory structure:

./exe

./exe/data

./exe/system

./exe/tmp

where "data" is the directory where all new created files shell go therein.

So i had formerly to set this as <DataPath> in letodb.ini.

And because this reason still exists an ugly hack for accessing files in other directories with:

"../tmp/temp.txt" or "../myini.ini".


After quite a few hours cleaning and experiments,

i have "SET DEFAULT TO" and "SET PATH TO" working at server side.

It must be set before first Leto_Connect() call.


Then i can set "./exe" as <DataPath> root directory in letodb.ini,

and "SET DEFAULT TO data" plus "SET PATH TO system;tmp" where other files

without given specific path element are searched.

So a "/myini.ini" with path separator will point into <DataPath>.

The <DataPath> directory "./exe" is always internally added to "SET PATH TO" search paths,

when at least one other is defined.

If none "DEFAULT/ PATH" is set, <DataPath> will become the "DEFAULT".


When above directory structure is found in: "/mnt/ssd/projects/exe/...",

and you set: "SET DEFAULT TO exe/data",

LetoDBf will know that you mean "/mnt/ssd/projects/exe/data" :-)


 
- Is there a function to copy any file from the server to a local disk of the client or the opposite ?
Leto_[Memo|File][Read|Write]

best regards
Rolf

Itamar Lins

unread,
Dec 19, 2016, 9:25:59 AM12/19/16
to Harbour Users
Hi!

.hbmk/win/mingw/ClientesNet.o:ClientesNet.c:(.data+0x318): undefined reference t
o `_HB_FUN_LETO_SETCURRENTCONNECTION'

FUN_LETO_SETCURRENTCONNECTION(),  LETO_GETCURRENTCONNECTION()
I use more than one connection simultaneously how to do this without using these functions?

Best regards,
Itamar M. Lins Jr.

elch

unread,
Dec 19, 2016, 10:32:55 AM12/19/16
to Harbour Users

Hi Itamar,


file: source/client/letomgmn.c, line: 526

change that: #if 0 ==> #if 1


That is a very scary function, i have outcommented of security reasons.

Because its design is to shoot into yourself foot.

At numerous places in source we find: get the active connection.

If that is the wrong one -- or even none after a try to set an invalid one -- you lost --> crash!


Once a table is opened with a specific connection, there is no need to manually change connection.

To open a table with a specific connection, you can use the "//1.1.1.1/filename" prefix ...


---

Do you have a snippet/ excerpt for me -- i like to think more about ...


best regards

Rolf

elch

unread,
Dec 19, 2016, 10:57:56 AM12/19/16
to Harbour Users

addendum, Itamar


Leto_Connect( "cIP:port" ) should also set and change the active connection,

and that is more secure, because it seach for a connection by given: "IP:port".


In opposite to that, this: LETO_SETCURRENTCONNECTION() directly hooks into low level system with a connection-number.

Who likes to remember these: who was number '3' this day .. :-)


Can you try if that Leto_Connect( "IP:port" ) works well as replace !??


best regards

Rolf

leon ravel

unread,
Dec 19, 2016, 12:40:38 PM12/19/16
to Harbour Users

Hi Rolf,
Thanks for your great work

1 - I receive some warning messages  ( Microsoft Visual Studio 10.0 / windows seven / Version: Harbour 3.2.0dev ) :

  source\server\letofunc.c(9049) : warning C4244: '=' : conversion de 'size_t' en 'HB_USHORT', perte possible de données
  source\server\letofunc.c(9061) : warning C4244: '=' : conversion de 'int' en 'HB_USHORT', perte possible de données
  source\server\letofunc.c(9215) : warning C4244: 'initialisation' : conversion de 'int' en 'HB_USHORT', perte possible de données
  source\server\letofunc.c(9232) : warning C4244: '=' : conversion de 'size_t' en 'HB_USHORT', perte possible de données
  source\server\letofunc.c(9259) : warning C4244: '=' : conversion de 'size_t' en 'HB_USHORT', perte possible de données
  source\server\letofunc.c(9279) : warning C4244: '=' : conversion de 'size_t' en 'HB_USHORT', perte possible de données
  source\server\letofunc.c(9297) : warning C4244: '=' : conversion de 'size_t' en 'HB_USHORT', perte possible de données
  source\server\letofunc.c(9300) : warning C4244: '+=' : conversion de 'int' en 'HB_USHORT', perte possible de données

2 -  dbcreate crashes the server.

  proc main
  RddSetDefault( "LETO" )

  If Leto_Connect( "//127.0.0.1:2812/" )=-1
     Return
  Endif
  Xdbf="VEND.MEU"
  Astru={ { "NAME",  "C", 10, 0 },;

               { "INFO",  "C", 32, 0 } }
  Dbcreate( Xdbf , Astru  , "LETO" )

Best regards
Leon


elch

unread,
Dec 19, 2016, 1:28:25 PM12/19/16
to Harbour Users
Hi Itamar,

If we use "IP:port" instead of a connection number, we can safe use these functions.
LETO_GETCURRENTCONNECTION() ==> "//IP:port/"
LETO_SETCURRENTCONNECTION( "//IP:port/" )

Try fresh download that if i overlooked something ...

Thanks for hint

Rolf

Am Montag, 19. Dezember 2016 15:25:59 UTC+1 schrieb Itamar Lins:

elch

unread,
Dec 19, 2016, 1:38:06 PM12/19/16
to Harbour Users
Hi Leon,


1 - I receive some warning messages  ( Microsoft Visual Studio 10.0 / windows seven / Version: Harbour 3.2.0dev ) :
M$ shell be happy again ..
 
2 -  dbcreate crashes the server.
?? - a crashing server would be most miserable work !!
Have not seen my multiple ones doing so for 'a longer time', equal what i tried.

Setting of your <DataPath>,
plus a complete short snippet please, about what you have tried, but i not ...

best regards
Rolf

Itamar Lins

unread,
Dec 19, 2016, 1:51:10 PM12/19/16
to Harbour Users
Hi!
I using:
Version: Harbour 3.4.0dev (92fc8ca) (2016-12-04 16:50)
Compiler: MinGW GNU C 6.2 (32-bit)

../../../../Documents/GitHub/letodbf/LetoDBf/source/server/letofunc.c: In functi
on 'leto_PathFinder':
../../../../Documents/GitHub/letodbf/LetoDBf/source/server/letofunc.c:9064:40: e
rror: 'uiLenOne' undeclared (first use in this function)
          memcpy( szTmpPath, szOnePath, uiLenOne );
                                        ^~~~~~~~
../../../../Documents/GitHub/letodbf/LetoDBf/source/server/letofunc.c:9064:40: n
ote: each undeclared identifier is reported only once for each function it appea
rs in


Best regards,
Itamar M. Lins Jr.

elch

unread,
Dec 19, 2016, 2:00:05 PM12/19/16
to Harbour Users
Hi Itamar,


 each undeclared identifier is reported only once for each function it appea
shame on me! -- fixed :-(

leon ravel

unread,
Dec 19, 2016, 2:38:47 PM12/19/16
to Harbour Users

Hi Rolf,
Your program test_dbf.prg does not work since I recovered the sources today, those of December 15 worked perfectly.

test_dbf.exe 127.0.0.1 -> the server crashes with error leto 1000 / syntax error

There is no change in file Letodb.ini

Port = 2812
DataPath = D:\LABENNE
Default_Driver = CDX
Lower_Path = 0
EnableFileFunc = 1
EnableAnyExt = 1
Allow_UDF = 1
Pass_for_Login = 0
Share_Tables = 0
No_Save_WA = 0
Pass_for_Manage = 0
Pass_for_Data = 0
Crypt_Traffic = 0
Cache_Records = 21
Debug = 1
Optimize = 1

Best regards
Leon

Itamar Lins

unread,
Dec 19, 2016, 2:46:38 PM12/19/16
to Harbour Users
Hi!
Changelog.txt: 2016-12-19 19:55 UTC+0100 Rolf

Is still askin for the function :-( SetCurrentConnection absent.

.hbmk/win/mingw/Estoque.o:Estoque.c:(.data+0x26f8): undefined reference to `_HB_
FUN_LETO_SETCURRENTCONNECTION'

Best regards,
Itamar M. Lins Jr.

elch

unread,
Dec 19, 2016, 3:24:04 PM12/19/16
to Harbour Users
Hi Leon,


test_dbf.exe 127.0.0.1 -> the server crashes with error leto 1000 / syntax error
Ok, that is no <server crash> but 'only' a common RTE (Harbour runtime error).
[ aka: the car isn't exploded, only the engine makes an odd sound ]

---
Take the sources from 19:55, for sure my last upload today.
Compile in "tests": hbmk2 test_dbf -b"
[ '-b' is for debugger ]
Start: test_dbf 127.0.0.1
then press "F8", not only one time, stay on it! -- about which row rises the RTE-1000 ?

Rolf

elch

unread,
Dec 19, 2016, 3:28:21 PM12/19/16
to Harbour Users
Hi Itamar,

this time i am sure, it shell work. The functions are 'back'.
Double counter-checked with a fresh download, last upload is 19:55.
Is an 'old' lib from 2 hours ago disturbing ?

best regards

elch

unread,
Dec 19, 2016, 3:36:10 PM12/19/16
to Harbour Users
Hi Itamar,

this time i am sure it shell work, double counter-checked with a fresh download ( GIT interface )
The function must be 'back' -- correct is that it was not there before 19:15
Does an 'old' lib from two hours ago disturb somehow ?

leon ravel

unread,
Dec 19, 2016, 7:54:54 PM12/19/16
to Harbour Users
Hi Rolf
With latest sources of Harbour 3.2 and Letodbf.
test_dbf.exe 127.0.0.1
row 35 dbcreate()  -> the server crashes with error leto 1000 / syntax error
the test1.dbf and test1.fpt files are created.
Best regards
Leon



elch

unread,
Dec 20, 2016, 2:44:02 AM12/20/16
to Harbour Users
Hi Leon,

after an hour additional tests ...
... you use latest server, but have not rebuild the client library.
That explainable and reproduce-able blows up the server -- sure !

best regards
Rolf

leon ravel

unread,
Dec 20, 2016, 6:08:10 AM12/20/16
to Harbour Users
Hi Rolf,
Letodb.exe and rddleto.lib have the same date.
To check if the client and the server
have the same version it would be necessary for example:
LETO_GETSERVERVERSION () -> 3.00 (r1612191955)
LETO_GETCLIENTVERSION () -> 3.00 (r1612161955)

In the file test_dbf.prg, I added a test if the file exists then the server scraches on the following line
Index on name tag name

The error message leto 1000 / syntax error occurs on a subsequent statement after the server is lost
Best regards
Leon

elch

unread,
Dec 20, 2016, 9:24:36 AM12/20/16
to Harbour Users
Hi Leon,

if you once used rddletoaddon.hbp, librddleto.a is found among the Harbour libraries.
Use system search for locating.
I have verified my example PRGs working fine, if you use both server and client in same version.
Further i may strengthen the place of cause for crash ...

best regards
Rolf

elch

unread,
Dec 21, 2016, 5:25:13 AM12/21/16
to Harbour Users

Hi Leon,


i have yesterday strengthened the cause of crash, if 'older' lib did not transmit DEFAULT/PATH setting.

It shell not happen anymore.

If still problems about crash exists, let me know about as then i would have once more to search for a cause.

[ myself correction: in case of MsVc library have a ".lib", not ".a" suffix ]


About 'version-ing': ready there, but refused at this state.

That is all LetoDBf 3.0 on way to 'final state',

and the lastly invention of DEFAULT/ search PATHs at server hopefully the last transmission protocol change for this version.

Also it is very recommended to generally compile both sides: server and client lib, and to not forget about an 'installed' lib.


best regards

Rolf



Am Dienstag, 20. Dezember 2016 12:08:10 UTC+1 schrieb leon ravel:

leon ravel

unread,
Dec 21, 2016, 8:01:16 AM12/21/16
to Harbour Users
Hi Rolf,
Thanks for your tremendous work to make it work properly Letodbf.
Before making a new installation from https://github.com/elchs/LetoDBf with the latest sources today, I checked and deleted all files regarding letodbf.

The server and the client are on the same date and time and I still have the server crashing with test_dbf.prg line 35 (dbcreate) after creating the test1.dbf and test1.fpt files
As I told you before, the 15 December sources worked perfectly. I have no information about the server crash to help you (nothing in letodbf.log).
Best regards
Leon


elch

unread,
Dec 21, 2016, 8:26:12 AM12/21/16
to Harbour Users

Very unlikely, Leon


set in letodb.ini:

Debug = 21

delete ! file "letodbf.log"

then restart server.


After crash search for two files:

letodb_crashf.log

hb_out.log


!! ZIP-pack !! these both ( if existing ) together with:

letodbf.log,

and attach them -- or send them as PM to my email address.


Rolf

leon ravel

unread,
Dec 21, 2016, 10:49:37 AM12/21/16
to Harbour Users
Hi Rolf,
There are no files letodb_crashf.log, hb_out.log after the server crashes.
I attach the files letodbf.log and letodbf_00.log.

best regards
Leon
letolog.7z

Itamar Lins

unread,
Dec 21, 2016, 1:48:05 PM12/21/16
to Harbour Users
Hi!
With Hwgui browse, while I use Cache_Records = 10 or 20... a get serious problem while show records into browse, the records are shown in the grid in wrong positions.
While I use
Cache_Records = 1 works fine or:

 DbSelectArea('pd')
 pd->(dbGoTop())
 nBuf := leto_SetSkipBuffer(1) //This way also the records are shown correctly.


Best regards,
Itamar M. Lins Jr.

elch

unread,
Dec 22, 2016, 1:20:51 PM12/22/16
to Harbour Users

Hi Leon,


after intense search i still have not found the cause -- here at me all fine.

What i can say from your logs:

the DBF is successful created, the answer correct composed,

then it seem to fail (even crash) sending the response .. :-(

That is very unlikely, as a millisecond before must have happened successful an initial request/ response pair for establishing the connection ...


Can we please repeat once again with a fresh source download, i modified some log entries.

( well done, both: letodbf.log and letodbf_00.log )


best regards

Rolf

leon ravel

unread,
Dec 22, 2016, 3:04:47 PM12/22/16
to Harbour Users
Hi Rolf,
Thank you for your hard work.
There is a link error :

  source\client\letomgmn.c(1512) : warning C4013: 'snprintf' non défini(e) ; extern retournant int pris par défaut

Best regards
Leon


elch

unread,
Dec 22, 2016, 3:30:24 PM12/22/16
to Harbour Users
Hi Leon,

then we take the sprintf(), after Harbour's hb_snprintf() crashed only with XP64 MinGw5.1 TDC  ... :-(

best regards
Rolf

Itamar Lins

unread,
Dec 22, 2016, 4:28:08 PM12/22/16
to Harbour Users
Hello!
Is there an alternative for me to work with Cache_Records> 1 or in case I hope you correct this problem?


Best regards,
Itamar M. Lins Jr.

elch

unread,
Dec 22, 2016, 4:58:33 PM12/22/16
to Harbour Users

Hello! Itamar,


you may wonder i even tried ... -- but i am unexperieced with HwGUI.


So i compiled HwGUI 2.20, took example: "samples/grid_5.prg",

modified it for LetoDBf [REQUEST LETO, ... ], and ...

... it crashes ! with an RTE even in original version when try to 'change' record data.

Then i switched back to HwGUI 2.19, there it seem to work.


I added me two index orders, but the browse don't refresh when an index related field changes.

So far it displays same like if DBF is at local drive.


---

Summa: make me please a snippet based on that "grid_5" or something alike,

where i can search what is where happening.

You can send me this here ZIP-packed or as PM to my eMail address ...

Without its getting hard for me to reproduce, to find a cause.


best regards

Rolf

Itamar Lins

unread,
Dec 22, 2016, 9:27:26 PM12/22/16
to Harbour Users
#include "hwgui.ch"
#include "rddleto.ch"
REQUEST LETO

Procedure main
LOCAL aDbS:={}, oDlg, oBrw

AADD(aDbS, {"a","c",4,0})

leto_Connect( '//localhost:2812/' )

DBCREATE("_test.dbf",aDbS)
DbUseArea(.T.,"LETO",'//localhost:2812/_test',,.T.,.F.,'PTISO')
/* leto_SetSkipBuffer(1)  */


INIT DIALOG oDlg CLIPPER NOEXIT AT 100,100 SIZE 300,200

   @ 10,10 Browse oBrw DATABASE of oDlg SIZE 200,150 APPEND

 
   Add column FieldBlock("a") to oBrw EDITABLE Header 'A' length 4
  
oDlg:Activate()

close all
/* Type down arrow (append mode)! */
/* type A<ENTER>,B<ENTER>, Oops B Hide! with leto_SetSkipBuffer(1) works! B not hide */
/* You need to chat a little quick. */
/* The strange thing for me is that if you keep typing C, D, E ... there's no problem anymore. The problem only occurs on line 2. */
/* If you wait a while after typing B, the problem does not occur. :( */

Best Regards,
Itamar M. Lins Jr.

leon ravel

unread,
Dec 23, 2016, 5:13:03 AM12/23/16
to Harbour Users
Hi Rolf,

I attach the files letodbf.log and letodbf_00.log.
Best regards
Leon

letolog.7z

Itamar Lins

unread,
Dec 24, 2016, 12:56:30 PM12/24/16
to Harbour Users
Hi!
In my case, I think this is a problem caused by the ghost record.
Because while I use dbgobottom() in my dbf(151 recno) browse, it show 152 recno, 1 more record and is the phantom record.
This when use Cache_Records > 1.

Itamar Lins

unread,
Dec 27, 2016, 8:06:51 AM12/27/16
to Harbour Users
Hi!
Here other random problem detected with use of memo field.
mObs := cl->observacao
Error BASE/1003  Varißvel nÒo existe: OBSERVACAO

Best regards,
Itamar M. Lins Jr.

Itamar Lins

unread,
Dec 27, 2016, 8:35:57 AM12/27/16
to Harbour Users
Hi!
Other problem:
DbUseArea(.T.,"LETO",'tipo54e.dbf','et',.T.,.F.,'PTISO')
cQuery := "cod_mercad == '"+cCodMerc+"' .AND. dtos(data) >= '"+DToS(dIni)+"' .AND. dtos(data) <= '"+DToS(dFim)+"'"
Index on cod_mercad FOR &cQuery temporary

Error LETO/1006  Erro de abertura: tipo54e.cdx in use by other
Called from ->ORDCREATE(0)


Best regards,
Itamar M. Lins Jr.

Itamar Lins

unread,
Dec 27, 2016, 8:44:34 AM12/27/16
to Harbour Users
Hi!
Other problem...

DbUseArea(.T.,"LETO",'tipo50e.dbf','er',.T.,.F.,'PTISO')

DbUseArea(.T.,"LETO",'tipo54e.dbf','et',.T.,.F.,'PTISO')
Set relation to nf_entrada into 'er'

Error DBCMD/2001  Workarea não está em uso: DBSETRELATION
Called from ->DBSETRELATION(0)

elch

unread,
Dec 27, 2016, 9:09:19 AM12/27/16
to Harbour Users
Hi Itamar,


DbUseArea(.T.,"LETO",'tipo54e.dbf','et',.T.,.F.,'PTISO')
cQuery := "cod_mercad == '"+cCodMerc+"' .AND. dtos(data) >= '"+DToS(dIni)+"' .AND. dtos(data) <= '"+DToS(dFim)+"'"
Index on cod_mercad FOR &cQuery temporary

Error LETO/1006  Erro de abertura: tipo54e.cdx in use by other
Called from ->ORDCREATE(0)
 
LetoDBf refuses to overwrite an index in use by other connection, where Harbour would allow.
That i have made intentional..
Can you please verify that no other connection have this index ( auto-) opened ?
 
Here other random problem detected with use of memo field.
mObs := cl->observacao
Error BASE/1003  Varißvel nÒo existe: OBSERVACAO
?? -- especially with memofields i made many tests, as i very need them.
 
Em sábado, 24 de dezembro de 2016 14:56:30 UTC-3, Itamar Lins escreveu:
Hi!
In my case, I think this is a problem caused by the ghost record.
Because while I use dbgobottom() in my dbf(151 recno) browse, it show 152 recno, 1 more record and is the phantom record.
This when use Cache_Records > 1.
 

i have tested with latest HwGUI (2.20 b3), tried your snippet with XP64.

So i typed:

K_DOWN --> append mode --> 'B' --> K_ENTER

Then i see one record in first position.

Repeating above, i get two records visibile, as it should be, no problems.


What HwGUI version do you use ?


best regards
Rolf

Itamar Lins

unread,
Dec 27, 2016, 9:37:10 AM12/27/16
to Harbour Users

Hi!
I use Hwgui, Changelog 2628 2016-11-17 and Letodb Changelog,v 1.350.2.242 2015/08/01 20:23:30 ptsarenko
All works fine here!

While I test LetoDBf, I get this problems I my ERP with 8 users LAN. I my local Acer Notebook, is very dificult test with all possibilities.


Best regards,
Itamar M. Lins Jr.

Itamar Lins

unread,
Dec 27, 2016, 9:46:19 AM12/27/16
to Harbour Users
Hi!
>LetoDBf refuses to overwrite an index in use by other connection...

>That i have made intentional..
:( Even if it is a temporary index ? How to I resolve this ?

elch

unread,
Dec 28, 2016, 5:47:04 AM12/28/16
to Harbour Users

Hello Itamar,


HwGUI browser misbehaviour should be fixed -- found the ugly bug, Thank you!

BTW, HwGUI locks the record in edit mode, but does not unlock afterwards ...


Temporary! index key should now also work,

but you need to set in letodb.ini server mode: No_Save_WA = 1.


---

Leon, are you still here ?

The DBF is created, the answer composed and ! send !

And immediate afterwards in the main! loop a crash !?

Still not explainable to me, and hard to track out the distance, we go after that next year ... ;-)


best regards

Rolf

elch

unread,
Dec 30, 2016, 4:43:09 AM12/30/16
to Harbour Users

Hi Henry!, Leon,


::Henry

please refresh LetoDBf sources with my upload a few minutes ago.

LetoDBf server will else not work with your BCC.


::Leon

it was the same problem for your MsVc compiler as for this stoneage BCC:

stack versus heap -- i forgot about this old topic of older compilers :-(

LetoDBf server should work again for you -- please let me know.


best regards

Rolf

leon ravel

unread,
Dec 30, 2016, 7:49:59 AM12/30/16
to Harbour Users

Hi Rolf,
Thanks for all your efforts for letodbf.
With the latest sources:
 - Letodb in default mode __WIN_DAEMON__ (start / B letodb.exe) works again
 - Letodb in service mode (letodbsvc) installs but does not start

In the readme.txt file, there are missing rows for starting and stopping the service
  net start LetoDbf_Service
  net stop LetoDbf_Service

Spend a Happy New Year
Best regards
Leon

Itamar Lins

unread,
Jan 4, 2017, 9:59:04 AM1/4/17
to Harbour Users
Hi!
Same problem here:
net start letodbf_service //not working.


Best regards,
Itamar M. Lins Jr.

Itamar Lins

unread,
Jan 4, 2017, 10:02:32 AM1/4/17
to Harbour Users
Hi!
More info:
01.04.2017 11:55:12       Error installing LetoDB service:       1073
01.04.2017 11:59:16       LetoDB service has had some problems:       1063


Best regards,
Itamar M. Lins Jr.

elch

unread,
Jan 4, 2017, 10:30:45 AM1/4/17
to Harbour Users
Hi Itamar,

excuse, but seem not 'same' problem, as Leon got it to run as service.
Leon showed us a way to start the LetoDB service from command line.
I would have changed into the GUI management for services ...

Numeric results are of Windows function: GetLastError()


01.04.2017 11:55:12       Error installing LetoDB service:       1073

ERROR_SERVICE_EXISTS

1073 (0x431)

The specified service already exists.


01.04.2017 11:59:16       LetoDB service has had some problems:       1063

ERROR_FAILED_SERVICE_CONTROLLER_CONNECT

1063 (0x427)

The service process could not connect to the service controller.


Is this last error because of case sensitive-ness of service names ?

You wrote: "net start letodbf_service", all in lower case.


best regards

Rolf

Itamar Lins

unread,
Jan 4, 2017, 11:13:02 AM1/4/17
to Harbour Users
Hi!

C:\devl\letodb\bin>sc delete letodbf_service
[SC] DeleteService ÊXITO // Service erase

C:\devl\letodb\bin>letodb.exe install

C:\devl\letodb\bin>net start letodbf_service

O serviço de LetoDBf Service foi iniciado com êxito. //Service run ok!

C:\devl\letodb\bin>net stop letodbf_service
O serviço de LetoDBf Service não foi iniciado. //Service not run :(
...
letodbf.log not show msg only this:
01.04.2017 13:05:17       LetoDB service has been successfully installed //while I type "letodb install"

With hbmk2 letodb.hbp -rebuildall // works fine!
with hbmk2 letodbsvc.hbp -rebuildall // not working!


Best regards,
Itamar M. Lins Jr.

It is loading more messages.
0 new messages