#1
  1. Web Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2001
    Location
    Finland
    Posts
    719
    Rep Power
    15

    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?
    -- Tomi Kaistila
    -- Developer's Journal

    The more you learn, the more you know.
    The more you know, the more you forget.
    The more you forget, the less you know.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13

    Re: Databases and C/C++


    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.
    Jon Sagara

    "Me fail English? That's unpossible!"
  4. #3
  5. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    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.
  6. #4
  7. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    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++.

IMN logo majestic logo threadwatch logo seochat tools logo