0

I need to create a dbf file which has the table structure of an existing dbf and insert data to it. Also I need to specify the NAME for it which i usually do in excel by insert->Name. Which is the best and easy way for it. I have tried using OLEDB already. But I need suggestions for the best option.

Vicky
  • 1,657
  • 6
  • 23
  • 33
  • You can use the `VFPOLEDB` provider to work with DBF's. What version of DBF are you trying to emulate? What's going to read it? I recently had to create `dBase III` compatible DBF files and managed it, but it was *pain*. – Cosmin Prund Apr 08 '11 at 12:07
  • 1
    See this: http://stackoverflow.com/questions/4932530/how-to-create-a-dbf-file-from-scratch-in-c – Cosmin Prund Apr 08 '11 at 12:24

1 Answers1

0

Have you tried:

System.IO.File.Copy(sourceFileName, destFileName);

Followed by opening the new file and truncating the data leaving the table structure?

Cos Callis
  • 5,051
  • 3
  • 30
  • 57