By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

System.Data.OleDb.OleDbException: Unspecified error

100+
P: 147
Hello

I hope some one can point me in the correct direction to answer this. I have a website which runs with C#, accessing an Access (2007) database on my local computer via IIS. Everything works great.

Every now and then I get an unspecified error System.Data.OleDb.OleDbException: Unspecified error) and I don't know why as nothing has changed (I have not touched the source code for weeks)!

Expand|Select|Wrap|Line Numbers
  1. Line 95:         siDA.SelectCommand = siCmd;
  2. Line 96:         siConn.Open();
  3. Line 97:         siReader = siCmd.ExecuteReader();
To resolve this, I just open up the Web.Config file click control-s to save it, refresh my web page and it works!

The only way I can replicate this issue is by opening up a page and repeatedly click on the refresh button!

I can only assume this is not something to do with my code, but may be a setting in IIS?

Does anyone have any ideas what I've done?

Thank you

Dave
Jan 26 '09 #1
Share this Question
Share on Google+
1 Reply


Plater
Expert 5K+
P: 7,872
That almost assuredly sounds like a previous database connection was already open and was not closing properly.
Are you making sure you close the connection?
Jan 26 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.