Solved

C# 2005

Posted on 2009-05-05
7
174 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

734 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