Excelt and ADO .NET !!! made me cry now!!!
-
Hi Its getting pathetic and I dunno why !! I am trying to read/insert/update an excel sheet using ADO .NET. I am using following connection string to connect to the data source. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\App\files\file.xls;Extended Properties='Excel 8.0;HDR=YES;MAXSCANROWS =1' The development machine contains Microsoft Office and everything upto date and the application is working fine. On server I am getting following exception since last One Month!! --------------------------------------------------------------------- Could not find installable ISAM.Microsoft JET Database Engine at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open() at MyPledge.ViewClientPaymentData.LoadData() in C:\Inetpub\wwwroot\MyApp\ViewClient.aspx.vb:line 58 --------------------------------------------------------------------- I have asked the server admin to do following ... - Give Rights to Read/Write to ASP NET process on directories containing excel files - Update Jet Drivers from following URI, http://www.microsoft.com/downloads/details.aspx?FamilyID=1E268B39-533E-48B0-B8D7-1781BEFDE1F8&displaylang=en But I am still getting this message... CAN anyone, PLEASE PLEASE help me??? I am one of the big .NET lovers but this thing is REALLY REALLY REALLY making me start to hate it .. :S :S :S... eff_kay ------------------- Therez No Place like ... 127.0.0.1
-
Hi Its getting pathetic and I dunno why !! I am trying to read/insert/update an excel sheet using ADO .NET. I am using following connection string to connect to the data source. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\App\files\file.xls;Extended Properties='Excel 8.0;HDR=YES;MAXSCANROWS =1' The development machine contains Microsoft Office and everything upto date and the application is working fine. On server I am getting following exception since last One Month!! --------------------------------------------------------------------- Could not find installable ISAM.Microsoft JET Database Engine at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open() at MyPledge.ViewClientPaymentData.LoadData() in C:\Inetpub\wwwroot\MyApp\ViewClient.aspx.vb:line 58 --------------------------------------------------------------------- I have asked the server admin to do following ... - Give Rights to Read/Write to ASP NET process on directories containing excel files - Update Jet Drivers from following URI, http://www.microsoft.com/downloads/details.aspx?FamilyID=1E268B39-533E-48B0-B8D7-1781BEFDE1F8&displaylang=en But I am still getting this message... CAN anyone, PLEASE PLEASE help me??? I am one of the big .NET lovers but this thing is REALLY REALLY REALLY making me start to hate it .. :S :S :S... eff_kay ------------------- Therez No Place like ... 127.0.0.1
First and foremost, make sure the version of ADO is at least as high as your development box. The Jet drivers may not help if the ADO layer is not in synch. find it here.[^] second, I think the Extended Properties section should be in double quotes rather than single:
Extended Properties="Excel 8.0;HDR=YES;MAXSCANROWS =1";
You will need to escape the quotes or use an @ style literal string. HDR=YES is the default, so you could ommit it. MAXSCANROWS =1 only considers the 1st row when determining column data types. I think the default is 8, so this part could also be ommitted, performance hit is negligible, and you appear to beleive the data types will be consistent. I have seen both of these be problematic with different versions of ADO. The ISAM error usually seems to mean that the current version of ADO/jet did not like the connection string, so experimenting with the Extended properties to try the minimal specification (Just "EXCEL 8.0") should be worthwhile. Why would anyone waste time arguing with an accountant about anything? Their sole function is to record what happenned, and any higher aspirations are mere delusions of grandeur. On the ladder of productive contributions they are the little rubber pads at the bottom that keep the thing from sliding out from under you. - Roger Wright
-
First and foremost, make sure the version of ADO is at least as high as your development box. The Jet drivers may not help if the ADO layer is not in synch. find it here.[^] second, I think the Extended Properties section should be in double quotes rather than single:
Extended Properties="Excel 8.0;HDR=YES;MAXSCANROWS =1";
You will need to escape the quotes or use an @ style literal string. HDR=YES is the default, so you could ommit it. MAXSCANROWS =1 only considers the 1st row when determining column data types. I think the default is 8, so this part could also be ommitted, performance hit is negligible, and you appear to beleive the data types will be consistent. I have seen both of these be problematic with different versions of ADO. The ISAM error usually seems to mean that the current version of ADO/jet did not like the connection string, so experimenting with the Extended properties to try the minimal specification (Just "EXCEL 8.0") should be worthwhile. Why would anyone waste time arguing with an accountant about anything? Their sole function is to record what happenned, and any higher aspirations are mere delusions of grandeur. On the ladder of productive contributions they are the little rubber pads at the bottom that keep the thing from sliding out from under you. - Roger Wright