I got my code to compile, but my dbf is empty. Here is my code:
Code: Select all
METHOD CreateTempTable2(cImportFile)
LOCAL aNew AS ARRAY
LOCAL oNetTemp AS DBServer
aNew := {}
IF !File(SELF:cTempTable)
AAdd( aNew, { "MPOLICY", "C", 12, 0, "MPOLICY" } )
AAdd( aNew, { "MCLAIM", "C", 15, 0, "MCLAIM" } )
AAdd( aNew, { "MSVCPHASE", "C", 5, 0, "MSVCPHASE" } )
AAdd( aNew, { "MTYPE", "C", 5, 0, "MTYPE" } )
AAdd( aNew, { "MDATE", "C", 15, 0, "MDATE" } )
AAdd( aNew, { "MTIME", "C", 3, 0, "MTIME" } )
AAdd( aNew, { "MUSERID", "C", 25, 0, "MUSERID" } )
AAdd( aNew, { "MMEMO", "C", 100, 0, "MMEMO" } )
AAdd( aNew, { "MAPPLIED", "C", 1, 0, "MAPPLIED" } )
if !DBCREATE(self:cTempTable, aNew, "DBFNTX")
MessageBox:Show("Unable to create temporary table for import", "Error", MessageBoxButtons:OK)
return false
endif
ENDIF
oNetTemp := DBServer{SELF:cTempTable}
oNetTemp:Zap()
oNetTemp:AppendDelimited(cImportFile, "',")
oNetTemp:Close()
oNetTemp := NULL_OBJECT
RETURN TRUE
Thanks,
Boonnam