Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Practices BindingContext vs. CurrencyManager
Message
 
To
05/01/2003 11:05:33
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00738110
Message ID:
00738164
Views:
23
Thanks, Bonnie, I'll continue forward without use of the CurrencyManager for now.

Question: I have a grid using the Northwind Orders table as the datasource, which uses an incrementing Identity column. After successfully adding a new order record the only way I can get the grid or related text fields to show the new OrderID (@@Identity value) is to:

1. Click on the grid
2. Rerun the query, then clear and reset the BindingContext for the grid.

I DO get the new OrderID back from the server after Inserting because I can click on the grid and it then updates to show it. So it is right there. But without CurrencyManager, how do I do this programmatically? I've tried many techniques over the last few hours. I quess I'm still thinking like a VFP programmer, and the disconnected record set commands are eluding me.

Any suggestions?

Don Meuse



>Don,
>
>Like Kevin, we use the BindingContext.Position for navigation and we add rows directly to our tables. We've not had any problems doing things this way. The app that we are developing is just about ready to go to beta, probably later this month.
>
>~~Bonnie
>
>
>
>>I am learning ADO/VB.Net with WinForms. In MS Press and other books I have studied there are a lot of examples of Winform apps that use CurrencyManager for adding and deleting rows and navigating through records, with commands such as:
>>
>> CurrencyManager.AddNew
>> CurrencyManager.Position = 0, etc.
>>
>>I am currently studying ".Net for Visual Foxpro Developers" by Kevin McNeish, which gives the best real-world examples of building applications and is the most well-written. It also gives a rudimentary framework for database applications which I would like to use as a base for my applications. But the word "CurrencyManager" is not mentioned in the entire book, nor is it used in the framework examples. In his examples the BindingContext object is used for navigation with commands like this:
>>
>> Me.BindingContext(Me.dsOrders, "Orders").Position = 0
>>
>>And the datarow and table objects are used directly for adding new rows, etc.
>>
>>Can real WinForm apps really be written without use of the CurrencyManager? If so, am I better off not using it at all? Or am I heading for a crash because it's use is not optional? I'm a newbie, so I would love any experience or recommendations you might have - I expect to put hundreds of hours into constructing/debugging my own basic framework techniques.
>>
>>Don Meuse
>>Spectrum Software
>>Miami, Florida, USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform