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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:21:49+00:00 2026-05-26T19:21:49+00:00

I am new in creating application in Visual Studio 2010. I recently created an

  • 0

I am new in creating application in Visual Studio 2010. I recently created an application which has a MySQL as a database. Now, I am creating an app where I used a MS Access 2007 as a database.

I have this code for the database connection of MySQL:

class DBConn
{
    string MyConString = "SERVER=localhost;" + "DATABASE=payroll;" + "UID=root;" + "PASSWORD=admin;";
    public DataTable retrieveRecord(string cmd)
    {
        MySqlConnection con = new MySqlConnection(MyConString);
        MySqlCommand command = new MySqlCommand(cmd, con);
        MySqlDataAdapter adp = new MySqlDataAdapter(command);
        con.Open();
        DataSet set = new DataSet();
        adp.Fill(set);
        con.Close();
        return set.Tables[0];
    }
}

My problem now is that how to change this code to access the database of MS Access 2007? Please help. Thanks.

  • 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-26T19:21:49+00:00Added an answer on May 26, 2026 at 7:21 pm

    Change the connection string to something like this: “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\yourdatabase.mdb;User Id=username;Password=password;”

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

Sidebar

Related Questions

I am new in creating application using Visual Studio 2010 and Microsoft Access 2007.
I'm new to creating applications using Visual Studio 2010 and MySQL. I am creating
Issue: When creating a new SilverLight Application Project from Visual Studio 2010, the SilverLight
I'm creating an application in Visual Studio 2010 C# and MySQL where the user
I'm new to Visual Studio 2010 C# and I'm creating an application where the
I am new in creating application using Visual Studio 2010 C#. I am creating
I have recently upgraded to Visual Studio 2010. I have kept database projects separate
I'm creating an application in Visual Studio which uses web reference. The URL for
I'm new creating applications using Visual Studio 2010 and Microsoft Access 2007. I already
Time ago I created an application which has some buttons in the form. Now

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.