System.Data.OleDb.OleDbException: Unspecified error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DaveRook
    New Member
    • Jul 2007
    • 147

    System.Data.OleDb.OleDbException: Unspecified error

    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.Ole Db.OleDbExcepti on: Unspecified error) and I don't know why as nothing has changed (I have not touched the source code for weeks)!

    Code:
    Line 95:         siDA.SelectCommand = siCmd;
    [B]Line 96:         siConn.Open();[/B]
    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
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    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?

    Comment

    Working...