Server Error in Application; System.Data.OleDb.OleDbConnection.Open() RRS feed

  • Question

  • User-464753427 posted

    In my workplace I have a ASP.NET application running iin IIS 6.0 on Windows Server 2003 with Net 2.0 + 3.0 + 3.5 + 4.0.

    Backend database is MS Access MDB. When user logins to Application following error (See Below) is displayed at most of the times. But not always.

    It works well sometimes.

    Can you help out?


    Error Page :-

    Server Error in '/OFS' Application.

    Unspecified error

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.Data.OleDb.OleDbException: Unspecified error

    Source Error: 

    Line 16:     Protected Sub but_login_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles but_login.Click
    Line 17:         cnn = New System.Data.OleDb.OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("~\MyData\feedback.mdb"))
    Line 18: cnn.Open() Line 19:         da = New System.Data.OleDb.OleDbDataAdapter("select * from table_user where user_id=" & Val(txtuser.Text) & " and user_pwd='" & txtpass.Text & "'", cnn)
    Line 20:         ds = New Data.DataSet

    Source File: C:\Inetpub\wwwroot\OFS\Default.aspx.vb    Line: 18 

    Stack Trace: 

    [OleDbException (0x80004005): Unspecified error]
       System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +969373
       System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +86
       System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +29
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4863644
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
       System.Data.OleDb.OleDbConnection.Open() +40
       _Default.but_login_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\OFS\Default.aspx.vb:18
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

    Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3618

    Saturday, August 27, 2011 11:30 AM

All replies

  • User3866881 posted

    Hello asp_dot_net:)

    When will this kind of error happens?

    And At which statements (blocks)?

    Thx again

    Monday, August 29, 2011 9:55 PM