Geeks With Blogs
Flippin IT The blog of Andrew Winn

I came across this the other day. I recently converted a .NET 1.1 project to .NET 2.0 using VS 2008 and during development testing a collegue had complained that he had been getting errors updating columns in a DataSet. The error was that the column was ReadOnly, so therefore could not update it.

I eventually tracked it down to the data coming from SQL Server 2000 database, some of the fields where not directly coming from columns in the database. Some where results from functions like IsNull and others derived from Case statements. So it was reasonable to assume that these could not be updateable directly back to the database. In this case the update would be via a stored procedure so it didn't need to be ReadOnly

Interestingly I could not find any documentation on this behaviour. Unless anyone can point it out?

Posted on Monday, January 19, 2009 4:35 AM ADO.NET | Back to top


Comments on this post: ReadOnly columns returned from SQL Server in DataTable

# re: ReadOnly columns returned from SQL Server in DataTable
Requesting Gravatar...
Thanks for the great post Admin ;)
Left by Frau on Apr 07, 2009 11:09 AM

# re: ReadOnly columns returned from SQL Server in DataTable
Requesting Gravatar...
read that article.
http://www.covidimus.net/wp/index.php/?p=73
Left by Harsh on Sep 10, 2009 5:56 AM

Your comment:
 (will show your gravatar)


Copyright © Flippin IT | Powered by: GeeksWithBlogs.net