Message: Object invalid or no longer set RRS feed

  • Question

  • Hi,


    This has been bothering me for a couple of days. I am developing a web application, which make many queries to several Excel spreadsheets. In my test on an XP machine, everything works fine. But when I moved it to a 2003 Server, I keep getting this error message, and the position that this occurs is not consistent, and there is a small chance that a job can be completed without error.


    I googled about this error, and everybody said Jet 4.0 SP7 would fix this. But my server is Windows 2003 Server SP1, which already has SP8.


    Your help is greatly appreciated.



    Wednesday, January 23, 2008 8:23 PM

All replies

  • Based on error looks like your code references some object that does not exists anymore and it is not necessary Jet a problem. Do you know which specific line of code generates it? If not, you need to add some sort of tracing into your application and try to identify exact place first.


    Thursday, January 24, 2008 11:09 AM
  • As I wrote before, the position of the problem seems to be random. One thing seems to consistent: the problem happens on OleDbCommand.ExecuteReader. All calls to OLEDB are made with freshly created OleDbCommand. The OleDbConnection objects are created and opened at the beginning, and closed in the finally block. I do not see any possibility of invalid reference in the calling code.

    Thursday, January 24, 2008 11:53 AM
  • I agree with Val.  When you say several Excel spreadsheets, are they the exact same number and in the same relative location when compared with your development (XP) environment?



    Thursday, January 24, 2008 1:49 PM
  • Actually the problem disappeared after I increased the server memory from 300MB to 512MB


    Monday, January 28, 2008 9:54 PM
  • It seems that I should revitalize this post. Now with no code change at all, the problem comes back, and restarting the server no longer fix the problem. What is more, after the first error occured, which gave an error message of "Object invalid or no longer set.", all successive queries to OleDb failed with another error message: "Cannot open any more tables".


    There is a Microsoft Knowledge Base article which seems to be descibing this very problem, but the solution (Service pack 6) it suggests does not solve my problem, since I already have SP8.


    Anybody has an idea?


    Friday, February 1, 2008 7:03 PM