#include "fivewin.ch"
#include "hbclass.ch"
#include "fileio.ch"
external ordkeyno, ordkeycount, ordKeygoto
function main()
*--------------------------
fillDB()
return nil
PROCEDURE FillDB
LOCAL oFile := TFileRead():New( "F:\programs\clipper\FWH\tdata\Docucollect\all.txt101_data_PP.txt" )
LOCAL cTemp := "",cTemp1:= "",cTemp2:= "",cTemp3:= "",cTemp4:= "",cTemp_var:= ""
LOCAL cAcNb := ""
Local nRecNo:=0,old_nRecNo:=0
CreateDBF()
oFile:Open()
IF oFile:Error()
msgStop( oFile:ErrorMsg( "FileRead: " ) )
ELSE
WHILE oFile:MoreToRead()
cTemp1:=cTemp:= oFile:ReadLine()
IF "BANK OF Cyprus" $ cTemp1
cTemp1:= oFile:ReadLine()
cTemp2:= oFile:ReadLine()
cTemp3:= oFile:ReadLine()
cAcNb := padL( allTrim( subStr( cTemp3, 30 ) ), 12 )
test->( dbAppend() )
test->ACNB := cAcNb
? cAcNb
cTemp_var := cTemp1 + chr(013) + chr (010) +;
cTemp2 + chr(013) + chr (010) +;
cTemp3 + chr(013) + chr (010)
test->TEXT += cTemp_var
endif
test->TEXT += ( " " + allTrim( cTemp ) + chr(013) + chr (010) )
ENDDO
oFile:Close()
ENDIF
test->( dbCloseArea() )
RETURN
STATIC PROCEDURE CreateDBF()
LOCAL aStru := {}
aAdd( aStru, { "ACNB", "C", 12, 0 } )
aAdd( aStru, { "TEXT", "M", 10, 0 } )
dbCreate( "TEST", aStru,, .T., "test" )
RETURN
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 38 guests