Databind Web Control to SQLiteDataReader fail

  • cab_codespring

    cab_codespring - 2005-01-22

    I am attemting to convert my asp.NET web application to use SQLite instead of Access. It connects just fine, but when I try to do the call to databind() on the web control I get the exception "System.Web.HttpException:DataBinder.Eval: 'Finisar.SQLite.SQLiteDataReader' does not contain a property with the name ReportDisplayName".  I looked in at the datareader in the debugger and the field was present in the list of mFieldNames, along with the other column read. It all looks fine, the data is there.
    here is the code
                  string sqlText = "SELECT " + nameFld+","+ idFld+" FROM ["+table+"]";
                    dr = GetDr( sqlText );
                    if(control.DataTextField != nameFld)
                        control.DataTextField = nameFld;
                    if(control.DataValueField != idFld)
                        control.DataValueField = idFld;
                    control.DataSource = dr;
    Any help appreciated.

    • cab_codespring

      cab_codespring - 2005-01-22

      I forgot the stack trace:
      DataBinder.Eval: 'Finisar.SQLite.SQLiteDataReader' does not contain a property with the name ReportDisplayName.
      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.Web.HttpException: DataBinder.Eval: 'Finisar.SQLite.SQLiteDataReader' does not contain a property with the name ReportDisplayName.

      Source Error:

      Line 62:                     control.DataValueField = idFld;
      Line 63:                 control.DataSource = dr;
      Line 64:                 control.DataBind();
      Line 65:             }
      Line 66:             finally

      Source File: c:\inetpub\wwwroot\bugtracks\dbaccess.cs    Line: 64

      Stack Trace:

      [HttpException (0x80004005): DataBinder.Eval: 'Finisar.SQLite.SQLiteDataReader' does not contain a property with the name ReportDisplayName.]
         System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName)
         System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName, String format)
         System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)
         BugTracks.DBAccess.PopulateListControl(ListControl control, String nameFld, String idFld, String table, Int32 defaultVal) in c:\inetpub\wwwroot\bugtracks\dbaccess.cs:64
         BugTracks.RunReport.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\bugtracks\runreport.aspx.cs:37
         System.Web.UI.Control.OnLoad(EventArgs e)

    • Mic

      Mic - 2005-02-13

      It's a bug need to be fixed.

      • Robert Foster

        Robert Foster - 2005-02-13

        Do you want to create a bug for this and take it on?

    • Mic

      Mic - 2005-02-13

      Well, I'll do it.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks