AppendDelimited
Posted: Fri Jul 19, 2019 9:58 pm
I see there was a question regarding AppendDelimited under XSharp over a year ago. The thread is https://www.xsharp.eu/forum/public-prod ... mited#3554.
I got my code to compile, but my dbf is empty. Here is my code:
This code run and create the dbf, but the appenddelimited method isn't putting any data in the table. My reference has System, VORDDClasses, VOSystemClasses, XSharp.Core, XSharp.RT. I am using the latest release (Bandol RC3). Is AppendDelimited still not implemented for XSharp?
Thanks,
Boonnam
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