Sign in to follow this  
Chris27

[.net] Toolbox item exceptions

Recommended Posts

This isn't related to games, but I hope someone can help. I'm making a forms application with C# and I use a lot of the visual tools because it speeds things up and I have less code to worry about. I would like to know if there is anyway to catch exceptions that occur from visual tools. Normally if your right the code yourself you just make a try catch block, but with the visual tools you can't see the code and can't put a try catch block around it. Here is my problem. I have a typed dataset and a instance of that dataset created by the tools in the toolbox. I then use a bindingsource from the toolbox and attach it to the dataset. The primary key needs to be unique. When you put in the same data in one row as there is in another row and navigate to another row it throws an exception that the value must be unique. The problem is I don't know how to catch the exception for this. There is no code to put a try catch and it crashes the program. If the only recourse it to create the dataset and binding source in code that sucks IMO. Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this