ReadOnly DataColumns with SQL Server 2005 but not SQL Server 2000

Discussion in 'Microsoft ADO .NET' started by Nergock@gmail.com, Oct 13, 2008.

  1. Guest

    Has anyone run into this discrepancy with SQL Server 2005 and the
    SqlDataTable Load method?

    In SQL Server 2000, when I create a table using the SqlDataTable.Load
    method passing it a SqlDataReader, I get a DataTable with DataColumns
    with ReadOnly property equal to False. However, the same method in
    SQL Server 2005 will
    return a DataTable with DataColumns with ReadOnly property equal to
    True. Changing the code
    to use SqlDataAdapter.Fill method fixes the issue but does anyone
    know
    the reason for this discrepancy between SQL Server 2000 and SQL
    Server
    2005?


    SqlDataTable.Load(SqlDataReader) returns readonly columns in SQL
    Server 2000.
    SqlDataAdapter.Fill(SqlDataTable) does not return readonly columns in
    SQL Server 2005.


    (The SqlDataReader was created using the SqlCommand.ExecuteDataReader
    method.)


    Thanks.
     
    , Oct 13, 2008
    #1
    1. Advertisements

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. ronniek

    DataColumns.Expression

    ronniek, Sep 11, 2003, in forum: Microsoft ADO .NET
    Replies:
    0
    Views:
    313
    ronniek
    Sep 11, 2003
  2. Germán
    Replies:
    0
    Views:
    226
    Germán
    Sep 30, 2003
  3. Doug Swanson

    Setting a datacolumns value to NULL?

    Doug Swanson, Nov 20, 2003, in forum: Microsoft ADO .NET
    Replies:
    1
    Views:
    164
    Rajesh Patel
    Nov 20, 2003
  4. James Lungoss

    Persisting Custom dataColumns in XML

    James Lungoss, Jan 26, 2004, in forum: Microsoft ADO .NET
    Replies:
    1
    Views:
    172
    James Lungoss
    Jan 29, 2004
  5. Cameron Thomas
    Replies:
    1
    Views:
    162
    Guest
    Oct 7, 2004
Loading...

Share This Page