05 Abr 2015 16:23
05 Abr 2015 17:02
// onde _PathAdm = "//127.0.0.1:2812/"
IF !FILE( _PathAdm + 'ADMIN.ADM' )
TONE( 321, 2 )
MSGBOX1( 'Arquivo Admin.ADM nÆo existe !!!', 'Erro...',,'&OK' )
RETURN( .F. )
END
// na função NETUSE... esta ajustado para o leto ser o RDD
IF !NETUSE( _PathAdm + 'ADMIN.ADM', 'Adm', SHARE )
MSGBOX1( Erro na abertura do arquivo...', 'Erro...',,'&OK' )
RETURN( .F. )
END
[Main]
; server port number;
Port = 2812
; connection timeout;
; TimeOut = -1
; path to a data directory on a server;
DataPath = c:\teste
; path and name of a log file;
Logpath = letodb.log
; default RDD to open files on server ( CDX/NTX );
Default_Driver = CDX
; memo type ( FPT/DBT ). Default: FPT for DBFCDX, DBT for DBFNTX;
; Memo_Type = FPT
; if 1, convert all paths to lower case;
Lower_Path = 0
; if 1, using of file functions ( leto_file(),
; leto_ferase(), leto_frename() is enabled;
EnableFileFunc = 0
; if 1, creating of data tables and indexes with
; any extention, other than standard ( dbf,cdx,ntx )
; is enabled;
EnableAnyExt = 1
; if 1, user authentication is necessary to
; login to the server;
Pass_for_Login = 0
; if 1, user authentication is necessary to
; use management functions ( Leto_mggetinfo(), etc. );
Pass_for_Manage = 0
; if 1, user authentication is necessary to
; have write access to the data;
Pass_for_Data = 0
; the path and name of users info file;
; Pass_File = "leto_users"
; if 1, the data passes to the network encrypted;
; Crypt_Traffic = 0
; if 0 (default, this mode server was the only from the
; start of a letodb project), the letodb opens all
; tables in an exclusive mode, what allows to increase
; the speed. If 1 (new mode, added since June 11, 2009),
; tables are opened in the same mode as client
; applications opens them, exclusive or shared, what
; allows the letodb to work in coexistence with other
; types of applications.
Share_Tables = 1
; The number of records to read into the cache
; Cache_Records = 10
; Maximum number of shared variables
; Max_Vars_Number = 10000
; Maximim size of a text variable
; Max_Var_Size = 10000
; Global function letodb RDDI_TRIGGER
; Trigger = <cFuncName>
; Global function letodb RDDI_PENDINGTRIGGER
; PendingTrigger = <cFuncName>
; Number of tables
; Tables_Max = 5000
; Number of users
; Users_Max = 500
; Debug level
; Debug = 0
; if 1, SET HARDCOMMIT OFF
; Optimize = 0
; SET AUTORDER setting
; AutOrder = 0
; _SET_FORCEOPT setting
; ForceOpt = 0
;[DATABASE]
Datapath = c:\teste
driver = cdx
05 Abr 2015 18:55
05 Abr 2015 18:57
05 Abr 2015 20:05
09 Abr 2015 20:53
04/09/15 20:45:00: Leto DB Server has been started.
Leto DB Server v.2.15 ! INIT: DataPath=, ShareTables=0, MaxUsers=500, MaxTables=5000, CacheRecords=10
04/09/15 20:45:00: C:\FFSoft\DESENV\hmg\letodb\bin\letoudf.hrb has been loaded.
09 Abr 2015 21:58
x := leto_udf("UDF_CRIPTO",Nome,"R")
ALERT(X)
zLetoDB := //127.0.0.1:2812/
_Chave := 'LETO_UDF("UDF_CRIPTO",Nome,"R")'
_Tag := ALLTRIM( (_ANtx)->Tag )
_NomeInd := zLetoDB+"Teste"
INDEX ON &(_Chave) TAG &(_Tag) TO &(_NomeInd)
09 Abr 2015 22:32
09 Abr 2015 22:41
[MAIN]
Port = 2812
Logfile = "letodb.log"
DEFAULT_DRIVER = CDX
DATAPATH = c:\clientes\xyz\
ENABLEFILEFUNC = 1
CRYPT_TRAFFIC = 0
PASS_FOR_LOGIN = 0
PASS_FOR_MANAGE = 0
PASS_FOR_DATA = 0
Share_Tables = 1
Cache_Records = 100
[DATABASE]
DataPath = c:\clientes\xyz\
Driver = CDX
Leto DB Server v.2.15 ! INIT: DataPath=c:\clientes\xyz, ShareTables=1
, MaxUsers=500, MaxTables=5000, CacheRecords=100
09 Abr 2015 22:59
...Função indefinida
cQuery := " cod_client == '" + cCodCl + "' .and. dtos(vencimento) >= '"+dtos(dIni)+"' .and. dtos(vencimento) <= '"+dtos(dFim)+"'"
cOrdBy := " dtos(emissao) + cod_venda "
Index on &cOrdBy Tag re99 for &cQuery temporary eval {||oBar:Step(),.t.}
ou
cQuery := ""
If !empty(cCodFornecedor)
cQuery += "'" + cCodFornecedor + "' == cod_fornec .AND. "
EndIf
If !Empty(cLoja)
cQuery += " '" + cLoja + "' == loja .AND. "
EndIf
cQuery += " dtos(data_vcto) >= ["+DToS(dIni)+"] .AND. dtos(data_vcto) <= ["+DToS(dFim)+"] .AND. empty(data_pgto) "
cOrdBy := " dtos(data_vcto)+duplicata "
Index on &cOrdBy TAG pg99 FOR &cQuery temporary additive eval {||oBar:Step(),.T.}
09 Abr 2015 23:02
FUNCTION UDF_CRIPTO( nUserStru, aString, vTipo, Serie )
// aString -- String a ser criptografada/descriptografada
// vTipo -- Tipo 'C' Criptografa - 'R' Descriptografa
// Serie -- Utilizada como base no calculo
LOCAL cWord, cChave, nPos := 1, vChave := 0, nCnt, Chave := ""
LOCAL cString := aString, nSerie, cRetr := ""
nSerie := STRZERO( Serie, 6 )
nSerie := VAL( SUBSTR( nSerie, 1, 1 ) ) + VAL( SUBSTR( nSerie, 2, 1 ) ) +;
VAL( SUBSTR( nSerie, 3, 1 ) ) + VAL( SUBSTR( nSerie, 4, 1 ) ) +;
VAL( SUBSTR( nSerie, 5, 1 ) ) + VAL( SUBSTR( nSerie, 6, 1 ) )
FOR nCnt = 10 TO 60
Chave += CHR( nCnt + nSerie )
NEXT nCnt
DO WHILE nPos <= LEN( cString )
cWord := SUBSTR( cString, nPos, 1 )
cChave := SUBSTR( Chave, nPos, 1 )
IF vTipo = "C"
vChave := vChave + ASC( cChave )
cRetr := cRetr + CHR( ASC( cWord ) + vChave )
ELSEIF vTipo = "R"
vChave := vChave - ASC( cChave )
cRetr := cRetr + CHR( ASC( cWord ) + vChave )
ENDIF
nPos++
ENDDO
RETURN( cRetr )
harbour letoudf.prg -gh -n -w -iC:\HARBOUR\INCLUDE
04/09/15 23:16:12: Leto DB Server has been started.
Leto DB Server v.2.15 ! INIT: DataPath=c:\ff, ShareTables=1, MaxUsers=500, MaxTables=5000, CacheRecords=100
04/09/15 23:16:12: C:\FFSoft\DESENV\hmg\letodb\bin\letoudf.hrb has been loaded.
10 Abr 2015 01:04
C:\TESTE\..... o que esta dentro das sub-pastas, não acha...alguma sugestão ?
DATAPATH = c:\dados\
c:\dados\2015\
if Leto_file(dServidor+mAno+"\"+ArqInv) //-> "MeuIp:2812\2015\inventario2015.dbf"
10 Abr 2015 08:22
FFreire escreveu:executando o LETO_UDF("UDF_CRIPTO",NOME."C")...funciona normal...só da erro quando tento gerar um indice
10 Abr 2015 09:12
10 Abr 2015 11:08