Call SalFileOpen( FHND_FILEHANDLE, STR_FILENAME, OF_Text | OF_Read )
 
Opens, re-opens, creates, or deletes a file.
 
Parameters
 
hFile Receive   File Handle. The handle of the open file.
strFileName  String. The name of the file to open, create, delete, or test.
nStyle   Number. A constant that specifies the style in which to open the file. nStyle can be one or more styles combined using the bitwise OR (|) operator.
 
Return Value
 
bOk is TRUE if the function succeeds and FALSE if it fails.
 
Example
 
Actions
 
!Open source and destination files.
 
If SalFileOpen ( fhSrcFile, strSrcFile, OF_Read )
 
If SalFileOpen ( fhDestFile, strDestFile, OF_Create | OF_ReadWrite )
 
...
 
See Also
 
SalFileClose
SalListFiles
SalFileOpenExt

Call SalFileRead( FHND_FILEHANDLE, STR_VARNAME, N_BYTES_TO_READ )

Reads a buffer of characters from an open file to a string .
 
Parameters
 
hFile    File Handle. The handle of the open file.
strBuffer   Receive String. The string to which the data is read.
NBufferLength  Number. The number of bytes to read.
 
Return Value
 
nResult is the number of bytes read. On end of file, SalFileRead returns a byte count less than the requested amount.
 
Example
 
Actions
   ! Position to the beginning of the file
   Call SalFileSeek ( fhInFile, nFilePos, FILE_SeekBegin )
   Loop
     Set nCharsRead = SalFileRead ( fhInFile, strBuffer,
        nRecSize )
 
See Also
 
SalFileWrite
-----Original Message-----
From: Valdemiro Coimbra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 1:14 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [sqlwin] Ler ficheiro

Julio pode me dar um exemplo de uma instru��o que fa�a isso, � que com s� com isso fico na mesma.
 
Grato
-----Mensagem original-----
De: Julio Cesar Dalla Rosa - AlmapBBDO [mailto:[EMAIL PROTECTED]]
Enviada: 04 Abril 2001 16:03
Para: '[EMAIL PROTECTED]'
Cc: Valdemiro Coimbra; '[EMAIL PROTECTED]'
Assunto: RE: [sqlwin] Ler ficheiro
Import�ncia: Alta

Use SalFileOpen e SalFileRead.
-----Original Message-----
From: Orfeu Andrade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 12:18 PM
To: Sqlwin (Correio electr�nico)
Subject: [sqlwin] Ler ficheiro


 
Al� pessoal
Quem sabe me dizer como posso ler o conte�do de um ficheiro com extens�o txt de forma que eu possa ter o conte�do numa variavel ?
 
Obrigado
Valdemiro Coimbra
 
* * * * * * * * * * * * * * * * * * * * * * * * * *
Mailto: vcoimbra@sistec.co.ao or valdemiro@netangola.com
Celular: 091 200607
Servi�o: 325350

Responder a