Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 367687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:45:07+00:00 2026-05-12T13:45:07+00:00

I made a ListBox with your standard smart-control thing, and have it connected to

  • 0

I made a ListBox with your standard smart-control thing, and have it connected to a database. It gets the data I’ve pre-generated in there via query builder, so when I do this:

this.calibrate_swipesTableAdapter.Fill(this.xperdex_crandallDataSet.calibrate_swipes);

I get a listbox with my data.

THEN, when I add a chunk of data to it, via this:

toadd["card_number"] = card_number;
this.xperdex_crandallDataSet.Tables["calibrate_swipes"].Rows.Add(toadd);

It also works. It works great. Now, when I close, I lose all my information. Update my adapter and AcceptChanges, right?

Not so fast. When I call

this.calibrate_swipesTableAdapter.Update(this.xperdex_crandallDataSet.calibrate_swipes);

I get “does not contain a definition for ‘update'”.

What gives? I don’t see any reason why the same thing that does the filling, wouldn’t have an update method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T13:45:07+00:00Added an answer on May 12, 2026 at 1:45 pm

    You may want to take a look at TableAdapter Overview which states:

    If there is enough information in the main query, the InsertCommand, UpdateCommand, and DeleteCommand commands are created by default when the TableAdapter is generated. If the TableAdapter’s main query is more than a single table SELECT statement, it is possible the designer will not be able to generate the InsertCommand, UpdateCommand, and DeleteCommand. If these commands are not generated, you may receive an error when executing the TableAdapter.Update method.

    You have two choices:

    • Change your main query
    • Change the UpdateCommand.

    To change the UpdateCommand, find out what’s the name of the class generated for the TableAdapter. The code should look something like the following:

    
    SqlCommand yourUpdateCommand = new SqlCommand("UPDATE...", connection);
    this.calibrate_swipesTableAdapter.Adapter.UpdateCommand = yourUpdateCommand;
    

    UPDATE:

    As commenters said, there are other conditions for which the commands may not be generated. See the comments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently i have made a bar chart from a listbox from this example: http://weblogs.thinktecture.com/cnagel/2011/06/wpf-listbox-as-bar-chart.html
I have a ListBox which is made up of Grid Items in Multiple SelectionMode
I am making a custom Listbox (for the compact framework). I have made an
I have a ListBox that gets populated with items read from a JSON response.
i have made a listbox datatemplated with button and binded to a textbox. i
I have simple SL user control. A listbox which shows all customers and on
I have made a CheckedListBox using the following: <ListBox x:Name=lst_checkBoxList ItemsSource={Binding}> <ListBox.ItemTemplate> <DataTemplate> <CheckBox
I have made one custom user control (search text box), which basically consists of
Is it possible to have my comboBox, numericUpDown, and ListBox connected together? I want
I have a ListBox containing an ItemTemplate made up of a StackPanel containing a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.