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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:00:11+00:00 2026-05-26T03:00:11+00:00

I have a c++ program, and I am planning to use odbc to communicate

  • 0

I have a c++ program, and I am planning to use odbc to communicate my c++ program with mysql tables.

There is alot of tutorials online on how to access mysql tables using c++ and odbc, but how do I use c++ and odbc to load a excel file into mysql tables?

  • 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-26T03:00:12+00:00Added an answer on May 26, 2026 at 3:00 am

    One way is to save the file as a CSV and then execute the following statement

    LOAD DATA LOCAL INFILE ‘C:\\temp\\yourfile.csv’ INTO 
    TABLE database.table FIELDS TERMINATED BY ‘;’ 
    ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\r\n’ (field1, field2);
    

    in your program. i.e. if you are using the C++ wrapper,

    stmt = con->createStatement();
    stmt->execute(<above statement>);
    

    This should work.

    If you are using the C APIs then use

    mysql_query(conn,<above query>)
    

    The other way to do this would be to connect to Excel via an ODBC connection, import the data from there and import into MySQL. This is more complicated.

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

Sidebar

Related Questions

I'm using MySQL with Memcached, but I'm planning to start using PostgreSQL instead of
I have a C++ (technically MATLAB mex) program, which I am planning to use
I'm planning to make a very simple program using php and mySQL. The main
I have a program that creates a Windows user account using the NetUserAdd() API
I have a program that monitors debug messages and I have tried using a
I have been planning to build a Dentist Application for the use of the
I am planning to use libraries in my C++ program. Development is happening on
I have a new project starting up, and I was planning to use git
I am in the planning stages of writing a new program, and there's a
I have to do my final year project and I'm planning to use 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.