Excel and ADO .NET ... it made me cry now!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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/...39-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
 
It sounds like the Jet Engine is not installed. The link you gave goes to a
Win 2K update it may not be the appropriate one.

The following may be useful to determine the problem. It lists the files
required by various providers:

http://support.microsoft.com/default.aspx?scid=kb;en-us;278604

Also, the account under which the web server(IIS) runs must have access to
the TEMP directory for the ASPNET account (Documents and
Settings\MachineName\ASPNET\Local Settings\temp) because the Jet Provider
will create temporary files here that it uses.

Hope it helps...
 
fahad,

I believe that the problem is with your connection string. If the
connection object has a problem with the connection string you can get an
ISAM error. I have provided you a sample connection string to try in your
code below. Please try it out and let us know what happens.

I hope this helps.
 
Yes, the driver was not properly installed. After reinstallation, it now
seems to work fine.

Also, after installing Jet again, error was still there. Then I removed the
application and build/re-deploy the application again - and the thingy was
working fine.

Any idea why?

eff_kay
 
Brian,

Thanks for your reply. But I don't think so there is some problem with
connection string as the system is working fine on my test server.

I have just seen a totally unknown behavior, atleast to me. I reinstalled
the JET drivers on the production server and the application was not working
fine. Then I deleted the application, redeployed it, it started to work fine!

anyway, thanks for your time and help.

eff-kay
 
¤ 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/...39-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...

Can you open an Access database (instead of Excel) from that location?

The ISAM error typically indicates one of two possibilities. Either the Excel driver is not properly
installed (or security does not allow access to the Registry entry), or the connection string syntax
is incorrect. I don't see a problem with the connection string syntax you posted.

You receive a "Could not find installable ISAM" error message...
http://support.microsoft.com/default.aspx?scid=kb;en-us;209805


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Hi Paul,

Thanks for the reply. Like I said earlier, I re-installed the Jet Driver and
re-deployed the "Same" application, same version (after a rebuild), the
application started to work! Reinstallation does make sense, but not the
re-deployment of the application after a rebuild.

Anyway, thanks again :)

eff_kay
 
Back
Top