Click here to Skip to main content
15,881,588 members

How to delete a data controls artifacts

Darrell de Wet asked:

Open original thread
Greetings everyone.
I am writing .Net (VB2010) windows application that retrieves data drom an Access Database and I have a Combobox for which I have set the data source using DataAdapter. When this is done Visual Studio places some control below the Form[Design) - eg CommercialDbDataset, Project_MasterTableApapter and ProjectMasterBindingSource.

I am not sure what I have done but when I run (debug) the program I get 101 Build Errors - all generated from CommercialDbDataset.Designer.vb and I have NO CLUE as to how to even begin fixing them.

I figured that if i could delete all these artifacts and re-assign the DataSource i could solve my problem.

Does anyone know how I could safely go about doing this?

Any assistance would be truely appreciated.

- - - REVISIONS - - -
Good Morning Thanks for the responses. OK, I'm not too good at this (I am 2 weeks old in the .net world, I only know VBA and this is my first post ever) - I'll start over.

I am writing with Visual Studio 2010 Professional using only Visual Basic (Windows Applications). I also have an Access 2007 Database (.accdb) After placing combobox on the form, if you then view the combobox properties there is a DataSource property. If you click on 'Add Add Project dataSource' a wizard allows you to select the database (Calleed CommercialDb.accdb) and it sets up a connection and an SQl statement so that at runtime the combobox is populated with the field from the table that was selected during the 'wizard run' mentioned earlier. Wizard then places 3 controls on the form (not directly on it but underneath in a grey shade area below the form) called CommercialDBDataset, AuthoritiesBindingSource and AuthoritiesTableAdapter (Authorities being the name of the table within CommercialDB). Now my application has a parameter file which contains the path to the Database. this is use to build trhe connection string for other connections to the database. I have a test Database and a production database (the parameter file specifies which one the application should use). The path to the database in the controls that were created for the combobox Datasource are 'hard coded' so i got smart amd tried to change them - this resulted in the 101 errors (all reported from a ton of genetrated code that i could never possibly post on this site and it would largely be a waste of time because it is generated code. what i was hoping to do was delete the controls created by the datasource wizard, thereby delete the genetated code, and start again with the wizard. i am afraid to simply delete these things because i could end up with no program at all whereas i can still see my own code at the moment (although i cannot run the program) my question then is, how can i, if at all possible delete these controls (which i previously refered to as 'artifacts' your advive would be much appreciated because this is a fairly large program and I can't afford to lose it. thanks again
Tags: Visual Basic, .NET, Visual Studio (Visual Studio 2010)

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900