Sunday, December 28, 2008

Creating CSV file using Oledb object in C#.net

OleDbConnection OleDbCon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strCSVPath + ";Extended Properties=\"text;HDR=Yes;FMT=Delimited(,)\"");
OleDbCmd = new OleDbCommand("Create table BundlesTable.csv(ProjectName varchar(250),BundleName varchar(250),BundleItems varchar(250))", OleDbCon);
OleDbCmd.ExecuteNonQuery();

No comments: