locked
Problem drive me nuts RRS feed

  • Question

  • User-909867351 posted

    Hi

    I have my site and sometimes i can't work on it i get the error:

    Server Error in '/' 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:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [OleDbException (0x80004005): Unspecified error]
       System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +1131233
       System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +53
       System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.OleDb.OleDbConnection.Open() +37
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
       System.Web.UI.WebControls.AccessDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +74
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
       System.Web.UI.WebControls.GridView.DataBind() +4
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
       System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
       System.Web.UI.Control.PreRenderRecursiveInternal() +86
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
    

    Sometimes it works and sometimes not. Any help, please

    Here is my connection

    Dim myConnection As OleDbConnection = Nothing

    Dim myCommand As OleDbCommand = Nothing

    myConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Server.MapPath("estagios.mdb"))

    Dim SQLemail As String = "SELECT * FROM dados_alunos WHERE ucase(codigo_aluno) = @quem "

    myCommand = New OleDbCommand(SQLemail, myConnection)myCommand.Parameters.Add(New Data.OleDb.OleDbParameter("@quem", UCase(Login1.UserName.ToString)))

    myCommand.Connection.Open()

    myCommand.ExecuteNonQuery()

    Dim ad As New OleDbDataAdapter(myCommand)Dim dt As New DataTable()

    ad.Fill(dt)

    Dim nome As String = Nothing

    If dt.Rows.Count > 0 Then

    Session("turma") = dt.Rows(0)("turma").ToString

    Session("numero") = dt.Rows(0)("numero").ToString

    End If

    If dt.Rows.Count = 0 Then

    lblAviso.Text = "Reporte Este Erro: Turma e Número não Identificado!"

    End If

    Thank you

    Thursday, May 28, 2009 12:12 PM

Answers

  • User-821857111 posted

    Often, this is permissions related.  Make sure the that account under whcih your web site is running (ASPNET on XP Pro, NETWORK SERVICE on Vista and Server3003/8) has MODIFY permissions on the Folder that the database is in.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 28, 2009 3:02 PM

All replies

  • User1290601759 posted

    Please make sure you properly close the connection after use.

    Thursday, May 28, 2009 12:28 PM
  • User-821857111 posted

    Often, this is permissions related.  Make sure the that account under whcih your web site is running (ASPNET on XP Pro, NETWORK SERVICE on Vista and Server3003/8) has MODIFY permissions on the Folder that the database is in.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 28, 2009 3:02 PM