views:

968

answers:

1

Hi there

What is the best way to remove a data source you no longer need from a VB2008 project?

Deleting the Data source in the Solution Explorer throws up loads of errors. Deleting tables in the design view of the Dataset designer throws errors. Deleting the Table Adapters at the bottom of the form throws up errors, and now my Toolbox is littered with old data source components in the Components palette.

How do I remove a data source gracefully? Am I missing something obvious?!

Thanks.

A: 

Through a bit of reading of all the objects created, and a bit of logical thinking, a satisfactory order I have found is.

  1. Delete Binding Source
  2. Delete table adapter
  3. DO NOT DELETE TABLE ADAPTER MANAGER if there are any other data sources.
  4. Remove lines of code placed in form Load event
  5. Delete schema from Solution Explorer

I still don't know how to remove the extra bits from the Toolbox though. Can anyone help with this bit?