connect simultaneously to 2 LETODB servers
Enviado: 27 Mai 2021 08:07
how I can connect simultaneously to two LETODB servers from a workstation on the same application
thanks in advance
thanks in advance
Em homenagem a Paulo Cesar Toledo
https://pctoledo.org/
3.2 Run as Windows@ service
For use as "Windows service" server executable must be compiled for this task, see 2.1
To install LetoDbf as service, the executable must be placed in a directory covered by the OS
system search paths to be found from any place. Then run letodb with 'install' parameter:
letodb.exe install [letodb.ini]
The 3rd param is optinonal for different config to use for multiple LetoDBf services, e.g.
running at different disk partitions.
Verify in letodbf.log that the service was successful installed and started.
To check the state of a Windows service use the GUI management for services.
Alternatively at command line can be used to start/ stop the service:
net start LetoDBf_Service
net stop LetoDBf_Service
If change PORT via letodb.ini for 2820 (example) second socket up 2821Port = 2812 - Server port number, default is 2812 [ then 2813 used for second socket ]
There are two! ports used by server, this and the following number.
Código: Selecionar todos
Port = 2812 Código: Selecionar todos
Port = 2820 Código: Selecionar todos
LETO_SETPATH( cPath[, lDefault ] ) ==> cOldPath
It set "SET PATH TO ( cPath )" at LetoDBf server.
This path(s) are relative to "DataPath" in 'letodb.ini' configuration and are searched for DBF tables
when *plain* table filenames without a path component are used for DbUseArea()/ DbSetIndex().
With optional given <lDefault> as true (.T.), "SET DEFAULT TO ( cPath )" is set at server,
then this will become a subdirectory of "DatPath" where *new* tables are created.
Also herefor filename must be given in *plain* form -- when containing a path, filenames are ever
treated as relative to 'DataPath'.
Setting the DEFAULT path also set 'DataPath' of 'letodb.ini' as search PATH, if its not already set.
Setting a search PATH also adds 'DataPath' itself as additional last search PATH.
<cOldPath> will be just a single ";" if no connection active or else error occured, else it is
the relative path(s) formerly active -- useful to temporary change and reset back to before.
Please note that no verification is done if the paths already exist, so non existing paths will
lead to not found files or even an create error.
Código: Selecionar todos
Leto_Directory( [ cDir ] [, cnAttr] ) ==> aDirectory
Returns a content of directory at the server in the same format as Directory() function.
With no given <cDir> the DataPath root directory is used.
Leto_DirExist( cPath ) ==> lDirExists
Determine if cirectory exist at the server, analog of Leto_File() function, but
for directories
Leto_DirMake( cPath ) ==> -1 if failed
Creates a directory at the server. [ renamed, formerly: Leto_MakeDir ]
Leto_DirRemove( cPath ) ==> -1 if failed
Deletes a directory at the server
Código: Selecionar todos
use \LOJA_00\estoque.dbf ...
use \LOJA_01\estoque.dbf ...
use \LOJA_03\estoque.dbf ...
...
IF LETO_FILE("\LOJA_00\estoque.dbf")
IF LETO_FILE("\LOJA_01\estoque.dbf")
IF LETO_FILE("\LOJA_03\estoque.dbf")