Last post May 29, 2017 04:03 PM by Duardo
May 29, 2017 03:15 PM|Duardo|LINK
Apparently, I cannot just add columns to the DBF. So I save dbf contents in a DataTable. Then, I need to delete all records in a dbf file,
then add the 3 new columns. My code fails at deleting the records
'The datatable below is filled
' On the above line I get this error: Syntax error in DELETE statement.
May 29, 2017 03:35 PM|PatriceSc|LINK
What if you try DELETE FROM PCI_xxxx ?
Edit: BTW are you sure you want to delete all rows once data are loaded in your data table. And what you want to do next? It seems to me you have a HIGH RISK TO LOSE DATA.
If you want to add new columns to a DBF file I would try to use ALTER TABLE ADD COLUMN. According to
https://stackoverflow.com/questions/8670231/how-to-add-column-to-dbf-file it seems it could work but it might depend on which provider you are using.
May 29, 2017 04:03 PM|Duardo|LINK
Well the FROM did it! Thank you.
As to possible data loss, you are correct. But I intend to use this code to create a couple of test scenarios. This will never hit production.