'System.Data.DataRowView' does not contain a property with the name XXXX RRS feed

  • Question

  • Hi,

    I have an ASP.NET application, built over DotNetNuke, used in my university for student management.


    Any now and then, when generating some long-running report, the application throws an error like this: "DataBinding: 'System.Data.DataRowView' does not contain a property with the name XXXX" where XXX may be different.


    I have to emphasize that _all these properties_ (that appear not to be found) _exist_ and they are generated OK by stored procedures (when querying in Sql Management studio). 95% of the time the code works but, when generating reports, it stops working...


    After an recompilation or application restart everything seems to work normally (until I generate some reports again).

    The DotNetNuke site may be accessed successfully all this time, while my modules throw previous exceptions. All the modules that throw errors are built using SqlServerDataSource. I've specified a "e.Command.CommandTimeout = 60;" luck....


    Server specs:
    - OS: Windows 2003 R2, 64 bit
    - SQL Server 2005 Standard, 64 bit
    - 8 GB RAM
    - Intel Xeon E 5345 2.33 Ghz (2 quad-core)



    Also posted (but no good satisfying answer):


    Wednesday, June 18, 2008 12:40 PM

All replies

  • Your problem obviously is not timeout or performance-related issue. SQL Server either returns the query result set or an error. There's nothing in between.


    I assume there's an interference of the web application SPs with report generating SPs. Please post the query that throws DataBinding exception.

    Wednesday, June 18, 2008 9:33 PM
  • yesterday night, after everyone finished their works I've stressed the server bringing it to ~95% CPU use for about 2 hours by generating multiple reports from multiple computers.... in all this time "my" error happened only once for about 20-30 seconds... after this I could not reproduce the error any more...


    i'll post one SP used for generating one report when i get back to work.


    Regarding the query that thorws DataBinding exeception....the exception may be thrown even by a very simple SP that uses only a simple select on a table... or even from a query from a view... I could not identify a pattern.




    Thursday, June 19, 2008 6:05 AM
  • In a complex application that employs a lot of SPs and produces different output its very easy to miss something. Is it possible:

    • The same GridView renders the output of the different sources?
    • The same DataSource calls different SP?
    • The same SP runs different queries producing different ouput?

    If any of the above is "yes" then I suggest to enable automatic column generation in GridView and remove all statically bound columns (for debugging purposes only). Also put a label on your web pages that would pop-up when the column count or their names are different/unexpected in this context. This way you get the exact result set SQL Server retuned and will be to track down the reason.

    Thursday, June 19, 2008 7:44 PM
  • I have been having this same error and it only started showing up after I applied CU7.  It seems to be tied to timeouts, sometimes, but I also tried to increase the connect timeout to no avail.  I also notice it happens on very simple calls and it is very random and happens for about 10-30 seconds.  One theory I have is that somehow a connection is getting corrupted but still sits in the connection pool.  I'm going to try and turn the connection pool off and see if it helps.  My datasets that are returned have the data and the columns, it's just that when you try to access the columns with names it fails.


    Wednesday, July 2, 2008 12:49 PM
  • Did you ever get this straightened out? We just rolled out a fairly substantial .Net application and are intermittenly seeing this same type of error. Did disabling the connection pool help out?

    Thanks In Advance,
    Wednesday, August 13, 2008 4:46 PM
  • Hi Catalin,


    At what point is the data from the stored procedure being filled into the DataTable or DataSet? Do you always load all of the data from the database/sp into a DataTable?


    What I am assuming is that you have somewhere in your code where you fill the data in. Would we be able to add more debugging where this is done? Perhaps after the data is filled you can capture some information about how many things were filled in, like a row count. If you see that after a fill the row count is 0 or in correct then you know something with the SP is likely the cause. If it isn't then we have to look a little deeper into the DataView that is used.



    Chris Robinson

    Software Developer in Test - DataSet




    Tuesday, August 19, 2008 4:06 PM
  • Re-opening with the same case or, even worst:

    on the machine we created another instance where we moved the tables used for intensive and large reports (like a data warehouse). For this instance we've also installed the Reporting Services.

    So, my config looks like:
    SQL 2005
    -instance 1: Reporting Services instance 1 with the main production database
    -instance 2: Reporting Services instance 1 with database used for reporting activities

    we have also checked for deadlocks using the 1222 flag but when the errors start occuring there are no deadlocks (no errors or warnings, in fact) in the logs for both instances.

    one interesting observation we've made: our application uses ObjectDataSource, SqlDataSource and code-behind data binding. These errors seem to appear only in the pages the use SqlDataSource but not in those using ObjectDataSource or code-behind data binding.

    Thank you,

    Wednesday, March 4, 2009 8:28 AM
  • I'm will move this thread to the Ado.Net Managed Providers.

    The scenario you have is to use a DataAdapter or something similar to fill a DataSet/DataTable and are depending on it to create the columns in the DataTable.  On occasion the column isn't there, hence the exception with "DataRowView does not contain a property with the name XXXX".

    So the problem is with when querying for the data it may not data or even a schema.
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to mark the replies as answers if they help.
    Tuesday, March 10, 2009 11:59 PM