Click here to Skip to main content
15,905,590 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have to process input file and input file records needs to be inserted into DB table using C++ on unix platform.

Table has 3 columns
Old number (Primary Key), New number and Date.

What should I need to use(ODBC / Any APIs) to complete this activity. Elaborate more on this.

Thanks in advance.
Posted

ODBC maybe a good choice (for instance, MySQL has an ODBC Connector[^]).
What is the database do you intend to use?
:)
 
Share this answer
 
ODBC is a good option as CPallini mentioned as it's actually part of the SQL standard. If a manufacturer wants to have a standard conforming RDBMS then they have to supply an ODBC driver/implementation.

That's the good news, the bad news is that most manufacturers don't give it their full attention (as it allows code to be portable and moved to a competitors DB) so they sometimes have weird bugs.

Having said that if you can get an ODBC library for your OS and an ODBC driver for your DB then it's the way to go as your code will be a lot more portable.

Cheers,

Ash
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900