Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design assistance
Message
From
05/12/2005 12:26:15
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01074006
Message ID:
01074983
Views:
22
Still not sure what does what here ... what you've described in your first post seems different than what you've described in your second post.

~~Bonnie


>>>I am not sure if I am approaching this the wrong way or if I am just making things a lot more difficult.
>>>
>>>Here is the scenario. I have a custom user control on my form. The user control raises an event, the form executes the method specified. the method makes a connection to a database and tries to update a row in a table. Now lets assume something went wrong (yes it might happen) and the record could not be updated. What is the reccomended (best practive) to convey that information back to the usercontrol?
>>
>>The best-practice method for "black-box" controls is to catch the error within the control, clean up any connections, readers, etc., and then throw a new exception. The new exception should be a custom type that is defined within the library that contains the control.
>
>I am not attempting to create a "black-box" control. The control is passed 3 datatables (through properties) used to display information to the user (it is a complex treeview control). I don't want the control to know anything about where the datatables came from. Now the user changes the Title of one of the tree nodes (same way as you would rename a folder in the explorer's treeview control). I don't want the control to connect to my datastore to update the name.
>
>Bottom line is that I want to keep data access separate from the custom control.
>
>Einar
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