Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create .DBF with VFPOLEDB Driver and not open in any excel
Message
From
11/06/2009 07:43:26
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Create .DBF with VFPOLEDB Driver and not open in any excel
Miscellaneous
Thread ID:
01405135
Message ID:
01405135
Views:
124
Hi,

We create .DBF file with the following Code and it is successfully created. But after creating .dbf file we are unable to open a file with EXCEL/OPEN OFFICE/ ANY DBF VIEWER.

Can any body please help us what to do in that case?

Here driver which we are using is vfploedb(VBF 9)

string connString = "Provider=vfpoledb; Data Source=" + System.Web.HttpContext.Current.Server.MapPath(folderPath) + "; Collating Sequence=general;";
string createStatement = "Create Table " + tableName + " ( ";

OleDbCommand cmd = new OleDbCommand();

OleDbConnection conn = new OleDbConnection(connString);

createStatement += "USR_TXN_NO";

createStatement += " Numeric(10,0), ";//USR_TXN_NO

createStatement += "UNITS";

createStatement += " numeric(19,8), ";//UNITS

createStatement += "DOB";

createStatement += " Date, ";//DOB

createStatement += "ECS_NO";

createStatement += " numeric(9,0)) ";//ECS_NO

DataSet dsCreateTable = new DataSet();

//Create the DBF table

DataSet dsFill = new DataSet();

OleDbDataAdapter daInsertTable = new OleDbDataAdapter(createStatement, conn);

daInsertTable.Fill(dsFill);
Next
Reply
Map
View

Click here to load this message in the networking platform