locked
DBF to CSV conversion RRS feed

Answers

All replies

  • Foxpro tables can not have more than 255 fields. That's their limitation and there is no workaround except for splitting the file horisontally.

     

    See http://msdn2.microsoft.com/en-us/library/3kfd3hw9(VS.80).aspx for VFP System capacities.

    Monday, August 13, 2007 3:09 PM
  • Hi,

     

     

    Thanks for the reply.  Could you pls. let me know, programatically how to split the file horizontally. Because, I will receive a dbf file with 261 columns.I need to convert this file into csv file. I am using C#.

     

     

     

    Thanks..

     

    Monday, August 13, 2007 3:21 PM
  • You may need to use more tables with max. 255 fields or use other software who accept more than 255 fields. Max number that I saw was 1024 fields.

    Monday, August 13, 2007 3:25 PM
  • They are not VFP/FoxPro files. I suspect they are Clipper files. I'll ask around how to work with them.

     

    I've asked a question and in the meantime you may try to look into Clipper ODBC if it exists.

     

     

     

    Monday, August 13, 2007 3:31 PM
  • You may need to use split tables (max. 255 fields) and with:

    SELECT ....GROUP BY.....in vfp you may create a cursor with max. 1012 columns and finally convert it in csv.

    Monday, August 13, 2007 3:38 PM
  • The question is - do you have any control for the DBF files you receive?

     

    I found http://linux.techass.com/projects/xdb/ not sure if you can proceed from there.

     

    Monday, August 13, 2007 3:41 PM
  • Hi,

     

    I do not have control over the dbf files.

     

     

    Thanks.

     

    Monday, August 13, 2007 3:51 PM
  • If the files have more than 255 fields you can not access them using VFP OleDB driver and have to use Clipper (I suspect) driver instead. Give a try to the library I found or google by "clipper ODBC"

     

    Monday, August 13, 2007 3:57 PM
  • Hi dni,

     

     

    I tried select statement specifying couple of column names from dbf file instead of select * from file name. But, I am getting the same error, .dbf is not a table..

     

     

    Thanks..

     

    Monday, August 13, 2007 3:57 PM
  • Hi Naomi, Nosonovsky,

     

     

    I do not have VFP installed on mu machine. I just downloaded VFP oledb drivers from,

     

    http://www.microsoft.com/downloads/details.aspx?familyid=e1a87d8f-2d58-491f-a0fa-95a3289c5fd4&displaylang=en

     

     

    Thanks..

     

    Monday, August 13, 2007 4:05 PM
  • You may try to use something like:

     

    http://www.dbfview.com/

    Monday, August 13, 2007 4:23 PM