Solved

C# 2005

Posted on 2009-05-05
7
173 Views
Last Modified: 2012-05-06
I am a real novice.  I'll need some help along the way.  There is a code that does not give an error, but still does not populate the combo box list with the states.  I am trying to learn both - use of the TableAdapter and the coding technique

private void frmCustomer_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'kQCStates.States' table. You can move, or remove it, as needed.
         
            this.statesTableAdapter.Fill(this.kQCStates.States);

        }
States table has only one field - abbreviations.

Please help.
0
Comment
Question by:Aquarus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Accepted Solution

by:
Aanvik earned 225 total points
ID: 24305307
http://www.codeproject.com/KB/cs/combobox.aspx

Check this out. This should help you achieve your goal.
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 50 total points
ID: 24305371
one question does your table adapter contains the value after the fill call?
0
 

Author Comment

by:Aquarus
ID: 24305740
Reply to AANVIK:

These are references that are currently exist.  When I am trying to use the method you soggested it is saying that"
Error      2      The type or namespace name 'OleDbConnection' could not be found (are you missing a using directive or an assembly reference?)

Please advise.  THank you      
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Aquarus
ID: 24305904
Reply to Raqi0017:
Abbreviations for state are in the table States.  The rest is wnat you see.  If I click on the table adapter  property - I can see preview all the states.
0
 

Author Comment

by:Aquarus
ID: 24306145
What namesapce contains DataViewManager?  Does this concept is true for Visual Studio 2005 C#?
0
 
LVL 9

Assisted Solution

by:tculler
tculler earned 225 total points
ID: 24306807
Aquarus:
The OleDbConnection is in the namespace System.Data.OleDb, so throw a "using System.Data.Oledb" using directive at the top of your program.

Also, the statesTableAdapter queries data and fills itself with the abbreviations of states beforehand, correct? I'm guessing that's what the "TODO" part is meant for.

The DataViewManager should be contained within the System.Data namespace; and yes, it should be valid in Visual Studio 2005.
0
 

Author Comment

by:Aquarus
ID: 24307354
Please take a look at the screenshot and help me provide the correct string for connectionstring.  
DBandConnectionString.doc
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET 2008 Winforms Signing 13 42
What are the simplest ways to create a Merge Sort? 3 37
Convert Silverlight ERP To Angularjs,HTML5 3 62
Stop Git from being my repository 1 26
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question