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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. ronniek

    DataColumns.Expression

    ronniek, Sep 11, 2003, in forum: Microsoft ADO .NET
    Replies:
    0
    Views:
    482
    ronniek
    Sep 11, 2003
  2. Germán
    Replies:
    0
    Views:
    370
    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:
    301
    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:
    378
    James Lungoss
    Jan 29, 2004
  5. Cameron Thomas
    Replies:
    1
    Views:
    241
    Guest
    Oct 7, 2004
  6. Paul Aspinall
    Replies:
    7
    Views:
    502
    Paul Aspinall
    Dec 2, 2005
  7. Paul Aspinall
    Replies:
    0
    Views:
    408
    Paul Aspinall
    Dec 2, 2005
  8. Paul Aspinall

    Sync SQL Server Express 2005 and SQL Server Mobile 2005.

    Paul Aspinall, Dec 4, 2005, in forum: Microsoft ADO .NET
    Replies:
    2
    Views:
    478
    Cowboy \(Gregory A. Beamer\)
    Dec 5, 2005
Loading...