FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To obtain record number from reading of fpt file
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
To obtain record number from reading of fpt file
Posted: Mon Aug 09, 2010 09:53 AM

include "FileIO.ch"

If I run this function..

FUNCTION MAIN()

LOCAL cAllMemos

// open and read all dbf file into cStringa variable
nHandle := FOPEN( "memo2.fpt" )
nSize := FSeek( nHandle, 0, FS_END )
FSeek( nHandle, -nSize, FS_RELATIVE )
cAllMemos := SPACE( nSize )
nRead := FRead( nHandle, @cAllMemos, nSize )
FCLOSE( nHandle )
? cAllMemos
RETURN NIL

variable cAllMemos contains in a single fRead all fpt file.

for instance

cAllMemos := [ 
@Harbour
FlexFile3

 *In this first memo field I write "MARCO"
¯  In this I write
"BOSCHI" ¯]

For example I have to know in wich records and in wich memo fields string "MARCO" is conteined. Obviously I know structure of MEMO2.DBF

The question is: is it possible to get the number of record and the name of memo field that corresponds to this search?

what are the rules for storing contents of memo fields in the file fpt?
Does exist some any documentation?

Thanks in advance

Marco


@Harbour
FlexFile3

 *In this first memo field I write "MARCO"
¯  In this I write
"BOSCHI" ¯

Marco Boschi
info@marcoboschi.it

Continue the discussion