1

I want to create a DBF file: it should be dBase III format.

  • As part of an ESRI Shapefile
  • dBase format III
  • WITHOUT A MEMO \ DBT FILE.
  • Single column multiple rows.

I've tried a lot of options the closest I got was using this: ( But it creates the annoying memo file along with it ).

string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\temp;Extended Properties=dBase III";

using (OleDbConnection connection = new OleDbConnection(connectionString))
using (OleDbCommand command = connection.CreateCommand())
{
    connection.Open();

    command.CommandText = "CREATE TABLE Test (Id Integer, Changed Double, Name Text)";
    command.ExecuteNonQuery();
}

as was suggested here.

Community
  • 1
  • 1
Lavi
  • 11
  • 3

1 Answers1

0

You probably won't come back to see this but this is to you and others who might benefit:

I'm also working on ESRI's shapefile and found that changing that connection string to specify the Provider to VFPOLEDB solves the problem. Try:

 string connectionString = @"Provider=VFPOLEDB;Data Source=D:\temp;Extended Properties=dBase III";

VFPOLEDB is Visual Fox Pro provider for Ole DB.

Lzh
  • 3,585
  • 1
  • 22
  • 36