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

  • Home
  • SEARCH
  • 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 8699115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:52:10+00:00 2026-06-13T01:52:10+00:00

I retrieve data from database like this: OleDbDataAdapter dataAdapter = new OleDbDataAdapter(SELECT * +

  • 0

I retrieve data from database like this:

OleDbDataAdapter dataAdapter 
            = new OleDbDataAdapter("SELECT * "
              + " FROM myTab1, myTab2"
              + " WHERE myTab1.col1 = myTab2.col3"
              , connection);//OleDbConnection connection = new OleDbConnection();
DataTable dataTable = new DataTable("myDataTable");
BindingSource bindingSource = new BindingSource();
bindingSource.DataSource = dataTable;
dataAdapter.Fill(dataTable);  

Then I use bindingSource in order to access the data in my program, everything works perfect. But after all changes I’ve made in bindingSource, I need so save them into the database. How can I do this?

  • 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-06-13T01:52:12+00:00Added an answer on June 13, 2026 at 1:52 am

    Well normally you’d call Update() on the DataAdapter:

    dataAdapter.Update(dataTable);
    

    But since your query “joins” two tables it may not be so easy. It may be possible if you turn your SELECT query into a proper join:

      "SELECT * "
    + "FROM myTab1 "
    + "JOIN myTab2 ON myTab1.col1 = myTab2.col3"
    

    Some other alternatives:

    • Write an UPDATE statement that will put the right values in the right tables and set your dataAdapter‘s UpdateStatement
    • Populate the dataset with separate tables (one per base table) and join in your app

    More info from MSDN:

    http://msdn.microsoft.com/en-us/library/xzb1zw3x(v=vs.80).aspx

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

Sidebar

Related Questions

Usually I retrieve and return data from a database like this: $sql = SELECT
When we are retrieving data from database, we use something like this SELECT *
I retrieve data from database using this query: SELECT * FROM tickets_departement_groups WHERE group_id
Can anybody tell how to retrieve data from database like that of Facebook's notification
so I am using php to retrieve data from mysql database. This data is
Trying to retrieve data using linq from a database. I would like to use
I retrieve data from a mysql database. I want to make this data available
How to retrieve data from sqlite database? Getting return value zero. -(id)init{ if(self==[super init]){
Iam trying to retrieve data from mysql database into stylesheet.php but it is not
I used $.getJSON to retrieve the data from my database. If the parameter dID

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.