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 9128687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:34:25+00:00 2026-06-17T07:34:25+00:00

I have two seperate databases from which I want to retrieve data and display

  • 0

I have two seperate databases from which I want to retrieve data and display in one grid view. The difficult I have is that I have a product key only in the table from the one database and the same set of product keys agains the actual products products in the other database and now I want to display the product data in one grid view….if this makes sense.

How can I do this, merge the data and display the product data agains the keys in the one grid.

string connString = "Data Source=.\\SQLEXPRESS;Initial Catalog=LRVWebsite;user ID=sa;password=lrmg;";
SqlConnection sqlCon;
OleDbConnection conn;

DataSet setOleDb;
DataSet dsSql;
private void bindData()
{
    try
    {
        conn = new OleDbConnection(@"Provider=Microsoft.Jet.OleDb.4.0;
                                Data Source =" + Server.MapPath("App_Data\\LR Product Database 2000.mdb"));
        conn.Open();

        setOleDb = new DataSet();
        OleDbDataAdapter dbaOle = new OleDbDataAdapter("SELECT * FROM tblProducts", conn);

        dbaOle.Fill(setOleDb);
        sqlCon = new SqlConnection(ConfigurationManager.ConnectionStrings["LRVWebsite"].ToString());
        sqlCon.Open();
        dsSql = new DataSet();

        SqlDataAdapter dba = new SqlDataAdapter(@"SELECT C.CustomerFirstName,C.CustomerLastName, C.CustomerCompany,C.CustomerPosition,C.CustomerCountry,C.CustomerProvince,C.CustomerContact,CP.ActionDate,CP.ProductCode,CP.CustomerEmail FROM tblCustomers C INNER JOIN tblCustomerProducts CP ON C.CustomerEmail = CP.CustomerEmail ORDER BY ActionDate DESC", connString);
        //@"SELECT C.CustomerFirstName,C.CustomerLastName,C.CustomerCompany,C.CustomerPosition,C.CustomerCountry,C.CustomerProvince,C.CustomerContact,CP.ActionDate,CP.ProductCode,CP.CustomerEmail FROM tblCustomers C INNER JOIN tblCustomerProducts CP ON C.CustomerEmail = CP.CustomerEmail ORDER BY ActionDate DESC", connString);
        dba.Fill(dsSql);

        dsSql.Merge(setOleDb);

        GridView1.DataSource = dsSql;
        GridView1.DataBind();


        sqlCon.Close();

This is what I have tried.Now, how can I get the product key to correlate with the actual product in the other table which contains the same product key?

  • 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-17T07:34:26+00:00Added an answer on June 17, 2026 at 7:34 am

    I think this is a commonly faced scenario. Here is a detailed link from msdn.

    Merge Data Set Contents

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

Sidebar

Related Questions

I have a group of CFC's that I access from two seperate Applicaiton scopes.
I have a method that transfers data from one database to another and in
I have two physically-separate MySQL databases on which I have to run a single
We have two databases, in two separate locations. One of the databases resides in
i have these two queries, that i want to join together, but am not
I have two separate web services, the first configured to extract data from a
Let's say I have two SQL Server databases running on separate machines, call them
I have two separate sets of tables in the same database that model the
I have two heroku accounts with two seperate applications. I am new at this
I have been looking all over for this. I have two seperate prpt files

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.