C# 2005

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.
AquarusAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
AanvikConnect With a Mentor Commented:
http://www.codeproject.com/KB/cs/combobox.aspx

Check this out. This should help you achieve your goal.
0
 
Anurag ThakurConnect With a Mentor Technical ManagerCommented:
one question does your table adapter contains the value after the fill call?
0
 
AquarusAuthor Commented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
AquarusAuthor Commented:
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
 
AquarusAuthor Commented:
What namesapce contains DataViewManager?  Does this concept is true for Visual Studio 2005 C#?
0
 
tcullerConnect With a Mentor Commented:
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
 
AquarusAuthor Commented:
Please take a look at the screenshot and help me provide the correct string for connectionstring.  
DBandConnectionString.doc
0
All Courses

From novice to tech pro — start learning today.