DataSet behavior change after upgrading to SQL 2008 RRS feed

  • Question

  • After upgrade from SQL 2000 to SQL 2008 dataset table count changed from 1 to 0 with the same data - empty row set. Using VB.NET 3.5. Here is a snippet of the legacy app:

    dsDisAttributeInfo = SqlHelper.ExecuteDataset(strConnectionString, CommandType.StoredProcedure, strCommandText, param)

    If dsDisAttributeInfo.Tables(0).Select("Description like 'Disney%'").Length > 0 Then

    With SQL 2000, even the rowset is empty, one table is present: dsDisAttributeInfo.Tables.Count = 1

    With SQL 2008 the same emtpy rowset makes dsDisAttributeInfo.Tables.Count = 0

    Logically, it makes sense.
    Are you aware of any official Microsoft announcement of this fix / change (URL)?
    Are you aware of any SQL 2008 config setting that makes DataSet behave as with SQL 2000?

    Thank you,

    Thursday, September 2, 2010 8:48 PM

All replies

  • Seems like something different is happening with the stored procedure.  When a single empty table was returned, the stored procedure actually did a SELECT though it returned zero rows.  When the table is not present, most likely the stored procedure exited prior to doing a SELECT.  Examine the stored procedure.  Possibly try executing it in Management Studio to get a feel for what happens.


    Friday, September 3, 2010 4:00 PM