Ola!
No caso vc precisa ser mais especifico.
Suas questões são difÃceis de entender para mim.
Não consigo compilar as libs, apresenta um monte de erros,
Cadê os erros ?
Net alguma coisa, tento a rodar a linha aqui e dá erro.
O que é net alguma coisa ? Cadê o erro ?
Seja mais claro. Faça postagens como essa que fez agora. Escreva ai sem medo de ser feliz!
O que vc não está entendendo ?
Vc só postou letodb.ini e letodbf.log até agora e reclamou que não está conseguindo êxito, mas preciso(amos) de mais informações.
beleza vou lá nos serviços ele está lá. Só isso?
Depende de vc, do seu conhecimento sobre serviços do windows.
O que vc não entendeu disso ai ? Faça a pergunta, que se eu não souber outros saberão.
Como ativar serviços do windows ? Ai neste caso já não é com LETODB são comandos do WINDOWS.
tasklist -> lista processos
net start, net stop. Ativar e desativar serviços, isso no Windows no Linux são outros comandos.
E o comando sc que remove(apaga) o serviço do letodb[f]
sc delete letodbf_service.
Precisamos saber através das suas perguntas o seu grau de entendimento do assunto, da forma que faz suas perguntas, eu penso que já sabe.
O Letodbf não tem dificuldade nenhuma.
Basta aprender os conceitos.
letodb.exe e o letodb.ini
e a lib librddleto.a que vc linka com sua aplicação.
Apenas esses 3 arquivos.
VC perguntou se pode rodar os arquivos da pasta exemplo(tests) não foi ?
Faça isso antes de perguntar. Compile e rode \tests\test_dbf.prg por exemplo. O que não entender vc pergunta. Se alguém souber vai responder, ajudar com certeza.
Vai fazendo ai, o que tiver duvida ou não souber vc pergunta.
Coloca o seu código ai para nós vermos como está fazendo.
Olhe o exemplo da pasta tests\test_dbf.prg é simples.
/*
* This sample tests working with dbf files
* Just change the cPath value to that one you need.
*/
REQUEST LETO
REQUEST DBFCDX
#include "dbinfo.ch"
Function Main( cPath )
LOCAL aNames := { "Petr", "Ivan", "Alexander", "Pavel", "Alexey", "Elch", ;
"Konstantin", "Vladimir", "Nikolay", "Andrey", "Dmitry", "Sergey" }
LOCAL i, aStru, aServerDriver
LOCAL nPort := 2812
FIELD NAME, NUM, INFO, DINFO, MINFO, TINFO
ALTD()
SET DATE FORMAT "dd/mm/yy"
IF Empty( cPath )
//cPath := "//127.0.0.1:2812/"
cPath := ""
RDDSETDEFAULT( "DBFCDX" )
ELSE
cPath := "//" + cPath + IiF( ":" $ cPath, "", ":" + ALLTRIM( STR( nPort ) ) )
cPath += Iif( Right(cPath,1) == "/", "", "/" )
RDDSETDEFAULT( "LETO" )
ENDIF
IF dbCreate( cPath + "test1", { { "NAME", "C", 10, 0 },;
{ "NUM" , "N", 4, 0 },;
{ "INFO", "C", 32, 0 },;
{ "DINFO", "D", 8, 0 },;
{ "TINFO", "@", 8, 0 },;
{ "MINFO", "M", 10, 0 } } )
? "File has been created"
ENDIF
USE ( cPath + "test1" ) NEW
IF ! NetErr() .AND. ! EMPTY( ALIAS() )
? "File has been opened"
ELSE
? "ERROR opening database! -- press any key to quit"
Inkey( 0 )
QUIT
ENDIF
aStru := dbStruct()
? "Fields:", Len( aStru )
FOR i := 1 TO Len( aStru )
? i, aStru[i,1], aStru[i,2], aStru[i,3], aStru[i,4]
NEXT
FOR i := 1 TO Len( aNames )
APPEND BLANK
REPLACE NAME WITH aNames[ i ],;
NUM WITH i + 1000,;
INFO WITH "This is a record number " + Ltrim( Str( i ) ),;
DINFO WITH Date() + i - 1,;
MINFO WITH aNames[ i ]
#ifndef __XHARBOUR__
REPLACE TINFO WITH IIF( i == 6, HB_STRTOTS( "" ), hb_DToT( DATE() + i, TIME() ) )
#else
REPLACE TINFO WITH IIF( i == 6, STOT( "00000000000000.000" ),;
STOT( DTOS( DATE() + i ) + LEFT( TIME(), 2 ) + SUBSTR( TIME(),4,2) + RIGHT(TIME(),2) + ".321" ) )
#endif
NEXT
? LEN( aNames ), "Records has been added"
INDEX ON NAME TAG NAME
? "INDEX KEY 1:", indexkey( 1 )
INDEX ON STR( NUM, 4 ) TAG NUM
? "INDEX KEY 2:", indexkey( 2 )
INDEX ON TINFO TAG TS
? "INDEX KEY 3:", indexkey( 3 )
INDEX ON INFO TAG ASH
? "INDEX KEY 3:", indexkey( 4 )
? "File has been indexed, "
?? DBORDERINFO( DBOI_ORDERCOUNT )
?? " active orders "
?? Iif( DBORDERINFO( DBOI_ORDERCOUNT ) == 4, "- Ok","- Failure" )
?
? "Press any key to continue..."
Inkey( 0 )
i := RecCount()
? "Reccount ", i, Iif( i == Len( aNames ), "- Ok","- Failure" )
DbSetOrder( 0 )
GO TOP
? "go top ", NUM, NAME, DINFO, Iif( NUM == 1001, "- Ok","- Failure" )
REPLACE INFO WITH "First", MINFO WITH "First"
DbGoTo( 5 )
REPLACE INFO WITH ""
GO BOTTOM
? "go bottom", NUM, NAME, DINFO, Iif( NUM == 1012, "- Ok","- Failure" )
REPLACE INFO WITH "Last", MINFO WITH "Last"
?
? 'ordSetFocus( "NAME" )'
ordSetFocus( "NAME" )
GO TOP
? "go top ", NUM, NAME, DINFO, Iif( NUM == 1003, "- Ok","- Failure" )
SKIP
? "skip ", NUM, NAME, DINFO, Iif( NUM == 1005, "- Ok","- Failure" )
GO BOTTOM
? "go bottom", NUM, NAME, DINFO, Iif( NUM == 1008, "- Ok","- Failure" )
SKIP -1
? "skip -1 ", NUM, NAME, DINFO, Iif( NUM == 1012, "- Ok","- Failure" )
DbSetOrder( 4 )
DBGOBOTTOM()
DBSEEK( "", .T. )
? "DbSeek( '',.T. ) ", NUM, NAME, DINFO, Iif( NUM == 1005, "- Ok","- Failure" )
DbSetOrder( 1 )
DBGOBOTTOM()
DBSEEK( "Petr", .F. )
? "DbSeek( 'Petr',.F. ) ", NUM, NAME, DINFO, Iif( NUM == 1001, "- Ok","- Failure" )
DBGOBOTTOM()
DBSEEK( "Petr", .T. )
? "DbSeek( 'Petr',.F. ) ", NUM, NAME, DINFO, Iif( NUM == 1001, "- Ok","- Failure" )
DBGOBOTTOM()
DBSEEK( "Pe", .T. )
? "DbSeek( 'Pe',.T. ) ", NUM, NAME, DINFO, Iif( NUM == 1001, "- Ok","- Failure" )
DbSetOrder( 3 )
DBGOBOTTOM()
#ifndef __XHARBOUR__
DBSeek( hb_DToT( DATE() + 5 ), .T. )
#else
DBSeek( STOT( DTOS( DATE() + 5 ) + "000000.000" ), .T. )
#endif
? "DbSeek( TS,.T. ) ", NUM, NAME, DINFO, Iif( NUM == 1005, "- Ok","- Failure" )
DBGOBOTTOM()
#ifndef __XHARBOUR__
DBSeek( hb_DToT( DATE() + 5 ), .F. )
#else
DBSeek( STOT( DTOS( DATE() + 5 ) + "000000.000" ), .F. )
#endif
? "DbSeek( TS,.F. ) ", NUM, NAME, DINFO, Iif( EOF(), "- Ok","- Failure" )
DbSetOrder( 1 )
DBGOTOP()
DBSEEK( "Sergey", .F. )
? "DbSeek( 'Sergey',.F. )", NUM, NAME, DINFO, Iif( NUM == 1012, "- Ok","- Failure" )
DBGOTOP()
DBSEEK( "Ser", .T. )
? "DbSeek( 'Sergey',.T. )", NUM, NAME, DINFO, Iif( NUM == 1012, "- Ok","- Failure" )
DBGOTOP()
DBSEEK( "Sergez", .F. )
? "DbSeek( 'Sergez',.F. )", NUM, NAME, DINFO, Iif( EOF(), "- Ok","- Failure" )
SET FILTER TO NUM >= 1004 .AND. NUM <= 1010
?
? "SET FILTER TO NUM >= 1004 .AND. NUM <= 1010"
GO TOP
? "go top ", NUM, NAME, DINFO, Iif( NUM == 1005, "- Ok","- Failure" )
SKIP
? "skip ", NUM, NAME, DINFO, Iif( NUM == 1010, "- Ok","- Failure" )
GO BOTTOM
? "go bottom", NUM, NAME, DINFO, Iif( NUM == 1008, "- Ok","- Failure" )
SKIP -1
? "skip -1 ", NUM, NAME, DINFO, Iif( NUM == 1004, "- Ok","- Failure" )
? "Press any key to continue..."
Inkey( 0 )
?
? "SET FILTER TO, SET ORDER TO 0"
SET FILTER TO
SET ORDER TO 0
GO TOP
? "First record", Iif( ALLTRIM( INFO ) == "First" .AND. MINFO == "First", "- Ok","- Failure" )
GO BOTTOM
? "Last record ", Iif( ALLTRIM( INFO ) == "Last" .AND. MINFO == "Last", "- Ok","- Failure" )
?
? 'ordSetFocus( "NUM" ), SET SCOPE TO "1009", "1011"'
ordSetFocus( "NUM" )
SET SCOPE TO "1009", "1011"
GO TOP
? "go top", NUM, NAME, DINFO, Iif( NUM == 1009, "- Ok","- Failure" )
SKIP
? "skip ", NUM, NAME, DINFO, Iif( NUM == 1010, "- Ok","- Failure" )
SKIP
? "skip ", NUM, NAME, DINFO, Iif( NUM == 1011, "- Ok","- Failure" )
SKIP
? "skip ", NUM, NAME, DINFO, Iif( Eof(), "- Ok","- Failure" )
dbCloseAll()
?
? "Press any key to continue..."
Inkey( 0 )
IF RDDSETDEFAULT() == "LETO"
aServerDriver := leto_DbDriver()
ENDIF
IF "CDX" $ RDDSETDEFAULT() .OR. ( VALTYPE( aServerDriver ) == "A" .AND. "CDX" $ aServerDriver[ 1 ] )
USE ( cPath + "test1" ) NEW
i := 0
? "auto opened index Tags:"
DO WHILE ! Empty( Ordkey( ++i ) )
? i, ordKey( i )
ENDDO
OrdSetFocus( 3 )
OrdDestroy( "TS" )
? "Indexord after OrdDestroy():", INDEXORD(), IIF( INDEXORD() == 0, " - Ok", " - Failure" )
ENDIF
dbCloseAll()
?
? "dropping test DBF: "
?? Iif( DbDrop( cPath + "test1" ), "- Ok","- Failure" )
?
? "Press any key to finish ..."
Inkey( 0 )
Return Nil
Faça perguntas diretas, não apenas reclame e se eu não souber outras pessoas sabem responder.
Saudações,
Itamar M. Lins Jr.