locked
Could not find installable ISAM RRS feed

  • Question

  • User-1222245141 posted

    Hi guys, I am trying to import a excel sheet into a table in Database.

    But when i execute this following code:

     

     

     

     

     

     

     

     

    using (OleDbConnection connection = new

    OleDbConnection(excelConnectionString))

    {

    OleDbCommand command =

    new OleDbCommand("Select id,name FROM [sheet1$]"

    , connection);

    connection.Open();

    // Create DbDataReader to Data Worksheet

    using

    (DbDataReader dr = command.ExecuteReader())

    {

    // SQL Server Connection String

    string sqlConnectionString = "Data Source=OFFSHORE1;Initial Catalog=Operations;User ID=TEST_USER;Password=wero@123;"

    ;

    // Bulk Copy to SQL Server

    using (SqlBulkCopy bulkCopy = new

    SqlBulkCopy(sqlConnectionString))

    {

    bulkCopy.DestinationTableName =

    "Test"

    ;

    I get the Exception:Could not find installable ISAM

    If Anybody has any idea on how to import an excel sheet into database,plz help!!!

    Thursday, June 25, 2009 5:03 AM

Answers

All replies