I am attempting to create a comma delimited file from a Paradox 7 table, but whenever I use the following code, I get a General Protection Error:
method pushButton(var eventInfo Event)
var
dt DataTransfer
endVar
dt.setSource("upload_e1.db")
dt.setDest("Upload_e123456.txt", DTAsciiVar)
dt.setDestFieldNamesFromFirst(True)
dt.setDestDelimiter("'")
dt.setDestDelimitedFields(DTDelimJustText)
dt.setDestSeparator(",")
dt.setDestCharSet(DTAnsi)
dt.TransferData()
endMethod
The line that seems to be causing the problem is dt.setDestFieldNamesFromFirst(True), but I am not sure why.
I need to have the column headings in the text file so that it can be uploaded into another program.
Any suggestions would be greatly appreciated.
Thanks,
pbare