Helpful Information
 
 
Category: C Programming
Databases and C/C++

I imagine that I can connect to several different kinds of databases with C or C++. I wanted to ask exactly how wide of a range of database can be connected with C/C++? And which databases would be refered over others?

Originally posted by Datamike
I imagine that I can connect to several different kinds of databases with C or C++. I wanted to ask exactly how wide of a range of database can be connected with C/C++? And which databases would be refered over others?

Lots, it just depends on your tastes.

I would imagine that this is just a preference. Probably all dbms support C/C++ with either thier own library files or through ODBC/CLI.
I have never tried using Access, but you can set it up through ODBC, so you could probably use this one also (although who would want to I don't know ;) ).
I personally use DB2 with either embedded sql or using a CLI library. (Prefer the CLI over embedded, don't have to bind to the database then) I use this mainly with C.

If you're going to be writing C++ code to access different databases and you want to make your code more portable, you might want to take a look at http://www.sqlapi.com/

They have class libraries that will help make your code usable across multiple platforms, compilers and databases. It also lists a bunch of databases that can be accessed using C++.










privacy (GDPR)