Read .CSV file
Posted on 2003-10-28
I was wondering if anyone could help me.
i have a csv file which is located locally at c:\INPUT.CSV
i am trying to read this file into a Datagrid but with out success.
i can do it if it was a Access database using something like
System.Data.OleDb.OleDbConnection conn = new
OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\\WSFEEDBACK.mdb");
OleDbCommand aCommand = new OleDbCommand("SELECT * FROM WebEvents ",aConnection);
DataSet DS = new DataSet();
OleDbDataAdapter myDA = new OleDbDataAdapter(aCommand);
OleDbDataReader myDataReader = aCommand.ExecuteReader();
if( myDataReader.Read() )
And so on..............................
Bit HOW do i fill a Dataset if it was a CSV file?
any help will be much appreciated..