|
|
||||||
|
#1
|
|
|
|
|
Alright, So this morning (as we are a week from launch on our product) I
come across an error as I add a simple thing to our system. A display column in our dataset for databinding for display purposes only. So everything goes smoothly, compile, start running, everything looking good. then I go to update a row.. get a System.Data.Readonly exception. I investigate further to find this is a known bug in the framework according to many articles. Here is one if you want to read about it some.. http://www.error-bank.com/microsoft....28_Thread.aspx So, I read the "workarounds" which are lame attempts to trick the framework by removing expression columns from the datatable before the update, and then add them back after the update. Now to me... this sounds really dumb... So I tried something. I attached to the RowUpdated and RowUpdating events of my DataAdapter. Rowupdating provides nothing useful. However Row Updated comes back with the Sql.Data.ReadonlyException This sets the Status property of the System.Data.SqlClient.SqlRowUpdatedEventArgs to ErrorsOccured. However, I check the database and my fields were updated as excpected. It's just the fact it can't change the Readonly property on the expression column... I don't care about that... So I set the Status to continue if the error is of Data.ReadonlyException No problems... I return to the UI Layer... No problems... all changes updated as expceted.... is there anything obvious I'm missing in this? Why this wouldn't work? Comments appreciated. Thanks, CJ |
|
|
|
#2
|
|
|
|
|
No problems, no problem !
OHM "CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message news:3300 [..] |
|
#3
|
|
|
|
|
Ha! Like you this is not the answer I wanted.
Ok, then why does about 300 people agree that removing the expression columns is the *best* way. There is no way that I figured out a better way to do it. I'm just not that smart. =) "OHM" <Me> wrote in message news:a556 [..] |
|
#4
|
|
|
|
|
I dont really have a good answer, other than if it works consistently, then
why worry about it. It's fixed in VS2005 probably anyway. OHM "CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message news:3988 [..] |
|
#5
|
|
|
|
|
First of all good to hear from you again OHM. havent heard from you in a
while. The challenge of overcoming the issue is the reason I will make myself trying to fix a problem like that which CJ is dealing with. Something like what happened to me with datatable.compute Ask Mr.Ryan how crazy I drove him with that one!! |
|
|
| Similar Threads | |
| Need help with workaround... I have read all about the web components not included in Office 2007, I understand all of that, but here is my dilemma. We are a small company that does business with a large... |
|
| Bad RAM workaround possible? One of the ram modules in my computer has sudden developed a fault that prevents Vista from booting up without causing a bluescreen. If I run the memory diagnostic it says... |
|
| Is there a CSS workaround? Hi all, Is there a workaround that I can use for IE7 as there was for IE6 with the * html I know that CSS support is improved but I am still getinmg different layouts on... |
|
| DX9 workaround I'm going to install Vista this week-end but I want to play Titan Quest, I've done a bit of research as to whether or not it will run under Vista or not. And what i have... |
|
| QAM Workaround?! I recently bought a DVICO Fusion5 HDTV Tuner, and am currently using a TERK TV5 HDTV Antenna to watch OTA HDTV. The card has support for QAM, but MCE2005 still does not! Has... |
|
|
All times are GMT. The time now is 04:19 PM. | Privacy Policy
|