Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create .DBF with VFPOLEDB Driver and not open in any excel
Message
De
11/06/2009 07:43:26
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Create .DBF with VFPOLEDB Driver and not open in any excel
Divers
Thread ID:
01405135
Message ID:
01405135
Vues:
123
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);
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform