Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB .NET VS2010
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
Posted 27-Nov-12 3:09am
Edited 28-Nov-12 4:20am
(no name)33.2K
v3
Comments
Sergey Alexandrovich Kryukov at 27-Nov-12 10:47am
   
Isn't that apparent that you did not provide enough information? Any code sample? Normally, there are no any undesired artifacts. If you screw up something, there could be many different reasons for that...
--SA
Kschuler at 27-Nov-12 14:25pm
   
If the OP is setting his database up in the designer, there isn't any code to post.
Sergey Alexandrovich Kryukov at 27-Nov-12 17:43pm
   
OK, but to give some help some artifacts and sufficient information is needed...
--SA
Kschuler at 27-Nov-12 14:29pm
   
Could you please clarify what you are doing in actual code and what you are doing in the designer? In other words, when you say that you are using a DataAdapter, are you typing code to make it or are you dragging it from the toolbox onto the Form and using a wizard to set it up? Can you give us a couple of the error messages that you are getting in your 101 build errors? Perhaps one thing is causing all of them. Also, your question is just tagged as .Net. What language are you using? I see that you put VB2010...does that really mean VS (Visual Studio) 2010 or are you coding in VB?
Darrell de Wet at 28-Nov-12 1:07am
   
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 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 shaed 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 datasouce 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 cant afford to loose it.
 
thanks again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 334
1 Kornfeld Eliyahu Peter 325
2 Maciej Los 239
3 OriginalGriff 188
4 King Fisher 185
0 OriginalGriff 6,303
1 DamithSL 4,764
2 Maciej Los 4,306
3 Kornfeld Eliyahu Peter 3,914
4 Sergey Alexandrovich Kryukov 3,538


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100