Unspecified error | FrameWork 1.1 | ASP.net | SQL 2000

Discussion in 'ASP .Net' started by =?Utf-8?B?R290ZG90TmV0?=, Nov 7, 2003.

  1. I get this error once in a while and I normally could fix it by restarting IIS. However, I would like to find out what causes this. Can anyone help?

    -----------------------------error screen-----------------------------------

    System.Data.OleDb.OleDbException: Unspecified error

    at System.Data.OleDb.OleDbDataReader.ProcessResults(Int32 hr)

    at System.Data.OleDb.OleDbDataReader.GetRowHandles()

    at System.Data.OleDb.OleDbDataReader.ReadRowset()

    at System.Data.OleDb.OleDbDataReader.Read()

    at System.Data.OleDb.OleDbDataReader.HasRowsRead()

    at System.Data.OleDb.OleDbDataReader.NextResult()

    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)

    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)

    at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)

    at DreamweaverCtrls.DataSet.DoInit()<hr>System.Data.OleDb.OleDbException: Unspecified error

    at System.Data.OleDb.OleDbDataReader.ProcessResults(Int32 hr)

    at System.Data.OleDb.OleDbDataReader.GetRowHandles()

    at System.Data.OleDb.OleDbDataReader.ReadRowset()

    at System.Data.OleDb.OleDbDataReader.Read()

    at System.Data.OleDb.OleDbDataReader.HasRowsRead()

    at System.Data.OleDb.OleDbDataReader.NextResult()

    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)

    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)

    at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)

    at DreamweaverCtrls.DataSet.DoInit()<hr>System.Exception: The DefaultView was requested but no tables yet exist.

    at DreamweaverCtrls.DataSet.get_DefaultView()<hr>System.Data.OleDb.OleDbException: Unspecified error

    at System.Data.OleDb.OleDbDataReader.ProcessResults(Int32 hr)

    at System.Data.OleDb.OleDbDataReader.GetRowHandles()

    at System.Data.OleDb.OleDbDataReader.ReadRowset()

    at System.Data.OleDb.OleDbDataReader.Read()

    at System.Data.OleDb.OleDbDataReader.HasRowsRead()

    at System.Data.OleDb.OleDbDataReader.NextResult()

    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)

    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)

    at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)

    at DreamweaverCtrls.DataSet.DoInit()<hr>System.Exception: The DefaultView was requested but no tables yet exist.

    at DreamweaverCtrls.DataSet.get_DefaultView()<hr>

    ----------------------- web.config -----------------------------------------------------
    <configuration><appSettings><add key="CONNECTION_HANDLER_app_Conn" value="default_oledb.htm" /><add key="CONNECTION_STRING_app_Conn" value="Provider=SQLOLEDB.1;Password=password;User ID=username;Initial Catalog=dbname;Data Source=123.123.123.123" /><add key="CONNECTION_DATABASETYPE_app_Conn" value="OleDb" /><add key="CONNECTION_SCHEMA_app_Conn" value="" /><add key="CONNECTION_CATALOG_app_Conn" value="" /></appSettings></configuration>
    =?Utf-8?B?R290ZG90TmV0?=, Nov 7, 2003
    #1
    1. Advertising

  2. "GotdotNet" <> wrote in message
    news:...
    > I get this error once in a while and I normally could fix it by restarting

    IIS. However, I would like to find out what causes this. Can anyone help?
    >


    For whatever reason, you appear to be working with a DataView for a table
    that is not being brought into existence in your code. Two bits of advice
    for getting a more meaningful error message:

    a) Use the native System.Data.SqlClient provider, instead of OleDb, i.e.
    instead of the OleDbDataAdapter, use the SqlDataAdapter, etc.
    b) Put the SQL execution inside a try/catch block, throw your own exception,
    and then publish the info from the InnerException. Like this:

    try
    {
    cmd.ExecuteNonQuery();
    }
    catch (SqlException E)
    {
    System.Text.StringBuilder MyErr = new System.Text.StringBuilder();
    MyErr.Append("A Data exception occured\r\n");
    MyErr.Append("Source: " + E.Source);
    MyErr.Append("\r\nMessage:" + E.Message);
    if (E.InnerException != null)
    {
    MyErr.Append("\r\nInner: " + E.InnerException.Message);
    }
    throw new SystemException(MyErr.ToString());
    }
    Richard K Bethell, Nov 7, 2003
    #2
    1. Advertising

  3. Rich - Thanks for your advice!

    Here's the issue, where should I place the try/catch block in this page?

    ----------------------------------- sample.aspx -------------------------------------------------

    <%@ Page Language="VB" ContentType="text/html" debug="false"%><%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %><MM:DataSet
    runat="Server"
    id="GETStuff"
    IsStoredProcedure="true"
    CreateDataSet="true"
    ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("CONNECTION_STRING_app_Conn") %>'
    DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("CONNECTION_DATABASETYPE_app_Conn") %>'
    CommandText="dbo._RunSProc"
    Debug="true"
    ><Parameters><Parameter Name="@id" Value='<%# IIf((Request.QueryString("id") <> Nothing), Request.QueryString("id"), "") %>' Type="Integer" Direction="Input" /><Parameter Name="@string" Value='<%# "Take this" %>' Type="VarChar" Direction="Input" /></Parameters></MM:DataSet><MM:pageBind runat="server" PostBackBind="true" /><html><head><title>Test</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><%

    server.Execute(GETStuff.FieldValue("NavTopHTML", Container))
    %><ASP:Repeater runat="server" DataSource='<%# GETStuff.DefaultView %>'><ItemTemplate><a href="goto.aspx?id=<%# GETStuff.FieldValue("id", Container) %>"><%# GETStuff.FieldValue("Item", Container) %></a><Br></ItemTemplate></ASP:Repeater></body></html>
    =?Utf-8?B?R290RG90TmV0?=, Nov 7, 2003
    #3
  4. Maybe I should format this for easier viewing:

    <%@ Page Language="VB" ContentType="text/html" debug="false"%><%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %><MM:DataSet
    runat="Server"
    id="GETStuff"
    IsStoredProcedure="true"
    CreateDataSet="true"
    ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("CONNECTION_STRING_app_Conn") %>'
    DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("CONNECTION_DATABASETYPE_app_Conn")
    %>'
    CommandText="dbo._RunSProc"
    Debug="true"><Parameters><Parameter Name="@id" Value='<%# IIf((Request.QueryString("id") <> Nothing), Request.QueryString("id"), "") %>' Type="Integer" Direction="Input" /><Parameter Name="@string" Value='<%# "Take this" %>' Type="VarChar" Direction="Input" /></Parameters></MM:DataSet><MM:pageBind runat="server" PostBackBind="true" /><html><head><title>Test</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><% server.Execute(GETStuff.FieldValue("NavTopHTML", Container)) %><ASP:Repeater runat="server" DataSource='<%# GETStuff.DefaultView %>'><ItemTemplate><a href="goto.aspx?id=<%# GETStuff.FieldValue("id", Container) %>"><%# GETStuff.FieldValue("Item", Container) %></a><Br></ItemTemplate></ASP:Repeater></body></html>
    =?Utf-8?B?R290RG90TmV0?=, Nov 10, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Z2F1cmF2?=

    Uploading Data From MS Acess 2000 ti SQL server 2000

    =?Utf-8?B?Z2F1cmF2?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    799
    Mary Chipman [MSFT]
    Jan 9, 2006
  2. RM
    Replies:
    3
    Views:
    609
    Yan-Hong Huang[MSFT]
    Aug 19, 2003
  3. C Did
    Replies:
    3
    Views:
    3,938
    Chris Lithgow
    Jun 20, 2006
  4. Denis

    Access 2000 or SQL Server 2000

    Denis, Jan 25, 2004, in forum: ASP General
    Replies:
    1
    Views:
    190
    Nicole Calinoiu
    Jan 25, 2004
  5. abcd
    Replies:
    0
    Views:
    162
Loading...

Share This Page