Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataAdapter SQL Updation
Message
From
09/01/2008 23:36:29
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01280766
Message ID:
01280782
Views:
19
Ooooh, ooooh ... let's get even more complicated! Are you planning on using Web Services (or, I guess the new way of doing stuff should be WCF, but I know nothing about that so I can't comment on it ... I know, I know ... *bad* MVP-me for not keeping up on the latest stuff, so that I can evangelize it to everyone!! <g>)

Anyway, we use Web Services ... and consequently, to keep the size down for what gets sent "over the wire", we only send back DataSet changes. So, in other words, say I get back a DataSet that has 3 tables. The first table is a parent table with one row, the other two are child tables containing several rows each. But the user only makes a few changes in the first table and a few in one row in the third table. Guess what gets sent back? A DataSet that contains one row in the first table and one row in the third table. And that's it.

Use DataSets (Typed DataSets preferably) for DataBinding to your controls. Do not put any DataAccess stuff directly in your UI (we simply call Web Service methods from our UI). You probably already know this, but so many example in books (don't get me started!!!) show it done the wrong way and too many people think it's the right way. Very sad.

~~Bonnie




>>>>>LOL! I have a reputation for doing that. Well, my co-workers might think so anyway, I'm a little more polite online. <g>
>
>Thank you! I won't yell at you if you ever ask what "lea eax,[edx+ecx+31]" means!
>
>I will review the code you posted. What we did in VFP (I remember what VFP is now) was to functionalize the Form (by subclassing it) to loop through every field/control and commit the values of the controls to the DBFs. With tables on the Form I classed it to either APPEND FROM or SCAN...ENDSCAN with APPEND.
>
>I notice in .NET, with Binding (which I thought you only get at Thanksgiving) that the Data is automatically flagged as needing to be updated, added or deleted in the source table (it's flagged in the DataSet), which is why I asked the original question - several books state it's the way to go but I've learned through harsh experience that what's written in books isn't always what works in real life.
>
>Perhaps I will have to build a more robust/reliable strategy as I did in VFP.
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