04 Dez 2015 09:22
CASE 'APS01'
IF SELECT(cDataBase) == 0 .OR. !&cDataBase.->(Used())
lAbriu:=NetUse(cServer, cDataBase, lShared)
ENDIF
lContinua:=.F.
EXIT
STATIC FUNCTION NetUse(cServer, cDatabase, lOpenMode, nSeconds, cRDD)
LOCAL lForever
hb_Default(@lOpenMode, .F.)
hb_Default(@nSeconds, 0)
hb_Default(@cRDD, "LETO")
hb_Default(@cServer, "")
lForever := (nSeconds = 0)
Do While (lForever .Or. nSeconds > 0)
If lOpenMode
DbUseArea(.T., cRDD, cServer + cDataBase, cDataBase, .T.)
Else
DbUseArea(.T., cRDD, cServer + cDataBase, cDataBase, .F.)
EndIf
If ! NetErr() // Use succeeds
RETURN (.T.)
EndIf
SysWait(1) // Wait 1 second
nSeconds --
EndDo
RETURN (.F.)
04 Dez 2015 09:30
[Main]
; server port number;
Port = 2818
; connection timeout;
; TimeOut = -1
; path to a data directory on a server;
DataPath = F:\Sistema ASAPREV\NETIO\SERVER5\DB
; 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 = 1
; if 1, creating of data tables and indexes with
; any extention, other than standard ( dbf,cdx,ntx )
; is enabled;
EnableAnyExt = 0
; if 1, user authentication is necessary to
; login to the server;
Pass_for_Login = 1
; if 1, user authentication is necessary to
; use management functions ( Leto_mggetinfo(), etc. );
Pass_for_Manage = 1
; if 1, user authentication is necessary to
; have write access to the data;
Pass_for_Data = 1
; the path and name of users info file;
Pass_File = .\leto_usuarios.usu
; if 1, the data passes to the network encrypted;
Crypt_Traffic = 1
; 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 = 100
; 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 = F:\Sistema ASAPREV\NETIO\SERVER5\DB
driver = cdx
04 Dez 2015 10:42
asimoes escreveu:AbreDBF() 1021 Tipo incorreto de dado: //192.168.1.2:2818\APS01
04 Dez 2015 11:56
04 Dez 2015 12:27
04 Dez 2015 16:56
asimoes escreveu:Verifiquei que todos usam a "\" deve ser isso mesmo.
asimoes escreveu:pois eu também informava a barra invertida "/" fiz um teste aqui com netio e funcionou.
22 Set 2016 15:06
22 Set 2016 20:01
22 Set 2016 21:21
23 Set 2016 08:03
Itamar M. Lins Jr. escreveu:Letodb com mensagem de erro em português ?
Itamar M. Lins Jr. escreveu:Não entendi a configuração.
JoséQuintas escreveu:Mas um dos erros parece ser no SKIP.
Por acaso não criou um índice que não comporta o valor?
23 Set 2016 08:18
USE ARQUIVO
SET INDEX TO ARQUIVO
USE NET:ARQUIVO
SET INDEX TO NET:ARQUIVO
FUNCTION Abre( nomearquivo )
USE ( "NET:" + nomearquvo )
23 Set 2016 08:23
outro erro interessante lendo uma tabela de cliente onde tem um campo chamado CLSOBS simplesmente ele leu todos os campos exceto este que referes-e a um campo MEMO DBT
Minhas tabelas foram estruturadas no velho e bom FoxPro /LAN 2.0
23 Set 2016 08:50
use pedidos
index on numero to índice
seek 1
internal error 4421
23 Set 2016 11:19
servidor compartilhado com samba, pasta compartilhada e estações acessando pelo compartilhamento, futuramente iremos trocar (se tudo der certo) por estações rodando linux e o sistema com WINE sobre o linux.
23 Set 2016 19:47
JoséQuintas escreveu:Se tem uma rotina genérica de abrir arquivos será fácil trocar.
De dbf pra hbnetio seria isto:
Itamar M. Lins Jr. escreveu:Você precisa usar o LetoDb criado no LINUX rodando com DAEMON, sem WINE, nem SAMBA. Esse é o problema ai.