locked
Could not find installable ISAM. RRS feed

  • Question

  • User-94554268 posted

    I am trying to update spcific rows/colums.  I have followed the microsoft ariticle on how to fix this.  http://support.microsoft.com/kb/209805

    Code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data.OleDb;
    
    namespace WebApplication1
    {
        public partial class WebForm2 : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
    
            }
    
            protected void Button2_Click(object sender, EventArgs e)
            {
                using (OleDbConnection conn = new OleDbConnection())
                {
                    conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;Extended Properties=Excel 12.0 Xml;HDR=NO";
                    string sql = string.Format("UPDATE sheet.Cells[6, B] = VALUES ('{0}'", TextBox1.Text);
    
                    using (OleDbCommand cmd = new OleDbCommand(sql, conn))
                    {
    
                        try
                        {
                            conn.Open();
                            cmd.ExecuteNonQuery();
                        }
                        
                        finally
                        {
                            conn.Close();
                        }
                        conn.Close();
                    }
                } 
            }
        }
    }

    Any ideas?  

    Friday, August 17, 2012 11:59 AM

All replies

  • User269602965 posted

    And the error is???

    Friday, August 17, 2012 1:33 PM
  • User-94554268 posted
    Server Error in '/' Application.
    
    Could not find installable ISAM.
    
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.Data.OleDb.OleDbException: Could not find installable ISAM.
    
    Source Error: 
    
    
    Line 28:                     try
    Line 29:                     {
    Line 30:                         conn.Open();
    Line 31:                         cmd.ExecuteNonQuery();
    Line 32:                     }

    Friday, August 17, 2012 1:41 PM