Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet readonly from a stored procedure
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 4.0
Database:
MS SQL Server
Miscellaneous
Thread ID:
01489891
Message ID:
01490124
Views:
58
Don,

Which column is causing the problem?

~~Bonnie


>>>>I am posting this because I am trying to help a client programmer but I am not at home where I can look at any of my code. He had problems with the DataSets when running against the two different stored procedures. When debugging he found one to be read-only. I assume that was a property of the either the dataset or the table within. Yes the framework is MM but I don't think (will check when home) there is anything in the framework that sets that and possibly it is detected because the stored procedures are different. I will look at it directly myself when I get home and see exactly what is going on. I had hoped there was a simple answer on how to force a dataset to be read-write.
>>>
>>>There is nothing inherent in a DataSet (nor a Typed DataSet) that would make any part of it read-only. Also the DataSet itself knows nothing about where it gets its data from ... so which Stored Procedure is filling it shouldn't matter either. Now, I know absolutely nothing about MM, so there could be something in there that's causing problems.
>>>
>>>I guess we'll have to wait until you get home to find out more info (specifically, exactly *what* is read-only).
>>>
>>>~~Bonnie
>>
>>Hi Bonnie,
>>I am home but will be out teaching today and tomorrow so no real time. I do see some of what he sent me. Here was his specific comment.
>>
>>"What causes the incoming data from that DataAdapter to configure the rows in the DataTable as ReadOnly or NOT ReadOnly? In the attached screenshot, at line 600 the nano-second that the DataAdapter fills the DataSet, the Rows of the DataTable of that DataSet switch from ReadOnly = F to ReadOnly=T when one stored procedure is called but stays ReadOnly=F when another stored procedure is called. "
>>
>Hi all,
> I'm the one causing this trouble. I mis-spoke in the paragraph above. It was not the ROWS of the DataTable that I was drilling down and checking the ReadOnly attribute of but rather the COLUMNS. Sorry about that.
>As I stepped through the program I hovered over/drilled down to the following property: DataSet---Tables----non-public members----List----
>[TableName]----Columns----non-public members----List---- [ColumName]----ReadOnly = (False/True depending on Stored Procedure used).
>
>
>Thanks!
>
>Don
>(Using Ron's account --to muddy the waters even further)
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform