Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Rows...
Message
From
16/03/2005 20:03:38
 
 
To
16/03/2005 19:52:38
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00996191
Message ID:
00996597
Views:
22
Hey Martin,

Yes, they'd be considered two different Binding objects, so you definitely don't want to mix-and-match. Pick one syntax and stay with it. I don't remember what the differences were, as it was early on in my learning of .NET that I ran into an issue with one and not the other (that was 3 years ago, my memory's not that good!! <g>) And, you know, that might even have been an issue from the 1.0 Framework that was fixed in the 1.1 Framework ... I just don't know and can't remember.

But, bottom line is that ever since then, I've been using the syntax
// For a typed DataSet
BindingContext[MyDataSet.MyTable]

// For a regular DataSet
BindingContext[MyDataSet.Tables["MyTable"]]
//   - or -
BindingContext[MyDataSet.Tables[0]]
oooops, sorry, that's C# syntax, but you get the idea (just use parens instead of brackets for VB).

~~Bonnie



>Bonnie,
>
>Thanx! for the tip! Just curious though, both syntax look the same except that one is refering directly to the table while the other is passing through the data set. Would the effects be different? I am actually still drawing up a template so I have been changing my codes everytime I get to read or discover a better way.
>
>I am currently using the first option you mentioned. However, if you think that the second would be much better I could make use of that instead. I am just so curious of what the difference would be?
>
>Thanx! a lot 8 )
>
>Martin
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