locked
CSV RRS feed

  • Question

  • User637234440 posted

    I am trying to connect with CSV file and getting error "Could not find installable ISAM" when i fill dataset with dataadapter code that i used to connect with csv is this

    string strCon = "Provider=Microsoft.ACE.OLEDB.12.0;Database=D:\\DATA;HDR=NO;Extended Properties =csv;fmt=,IMEX=1;"; 
    OleDbConnection OCon = new OleDbConnection(strCon);
    string strQuery = "SELECT * FROM 2392011_0.csv";
     OleDbDataAdapter ODa = new OleDbDataAdapter(strQuery, OCon);
    DataSet Dst = new DataSet();
    ODa.Fill(Dst);

    Tuesday, September 27, 2011 3:27 AM

All replies

  • User1073442754 posted

    Hi Saurabh

    This may be issue with connection string , You need to use the extended properties in "" just like

    ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" App.Path & "\..\Upload" & ExcelFileName & ".xls" & ";Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"""

    http://social.msdn.microsoft.com/Forums/en-SG/adodotnetdataproviders/thread/62ee4978-ca29-48d3-9367-6dd4ab639d2d

     

    Tuesday, September 27, 2011 3:36 AM
  • User637234440 posted

    hi Veera,

                  Thans for reply.

    I made the changes what u suggest but it still giving me same error "could not found installable IASM"

    New connection what i was used is

    string strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Database=D:\\DND_DATA;HDR=NO;Extended Properties =\"csv;fmt=,IMEX=1;\"";

    Tuesday, September 27, 2011 3:50 AM