Answered by:
How to resolve Could not find installable ISAM ASP.NET

Question
-
User-1099553463 posted
Hi all members,
I have MS Office 2007. Visual Studio 2008 and MS SQL Server 2008.
I want to load an excel data into MS SQL Server 2008. I have developed the following code. I am geting following error all the time.
"Could not find installable ISAM."
'---------------------------- CODE STARTS----------------------------
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Web
Imports System.Web.UI
Imports System.Data.Common
Partial
Public Class ImportDataInherits System.Web.UI.PageProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadEnd Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim excelConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=ExcelLoadSQL.xlsx;Extended Properties=\Excel 12.0;HDR=YES\ "
Using connection As New OleDbConnection(excelConnectionString)
Dim command As New OleDbCommand("Select HjYearID, HjMonthID, ItemID, ItemNameE, ItemNameA, SalesValue, SalesQty FROM [Sheet1$]", connection)
connection.Open()
Using dr As DbDataReader = command.ExecuteReader()
Dim sqlConnectionString As String = "Data Source=JED5244R; Initial Catalog=testfresh; Table=ExcelFileLoad ; UID =sa; PWD=xyz"
Using bulkCopy As New SqlBulkCopy(sqlConnectionString)
bulkCopy.DestinationTableName = "ExcelFileLoad"
bulkCopy.WriteToServer(dr)
End Using
End Using End UsingEnd Class
Saturday, May 8, 2010 5:03 AM
Answers
-
User5076454 posted
Hi ,
Is the database
located on a drive mapped as a UNC path? If so, it may be a
permission issue. See whether you can make it work by using impersonation.
You'd need to use an account created on the remote machine.
Let me know if it helps you.
Thanks.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 8, 2010 8:03 AM -
User197322208 posted
Please Guide how to Impersonate?Please read
http://support.microsoft.com/kb/306158
and tell what did you not understand.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 8, 2010 3:17 PM
All replies
-
User197322208 posted
impersonate your user in web.config or by code
http://support.microsoft.com/kb/306158
Saturday, May 8, 2010 5:41 AM -
User-1099553463 posted
Hi,
I am very new to .Net, This is my first application. Can you guide how to do this.
Please Guide how to Impersonate?
Thanks and Regards,
Izhar
Saturday, May 8, 2010 7:28 AM -
User5076454 posted
Hi ,
Is the database
located on a drive mapped as a UNC path? If so, it may be a
permission issue. See whether you can make it work by using impersonation.
You'd need to use an account created on the remote machine.
Let me know if it helps you.
Thanks.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 8, 2010 8:03 AM -
User197322208 posted
Please Guide how to Impersonate?Please read
http://support.microsoft.com/kb/306158
and tell what did you not understand.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 8, 2010 3:17 PM