Thread: Database connect

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    9

    Database connect

    Hello,
    Can anyone tell me how to connect to an SQL database and integrate the data into a program via C++. If at all possible, I would like to stick to standard coding. Thanks.

  2. #2
    Registered User OnionKnight's Avatar
    Join Date
    Jan 2005
    Posts
    555
    There is no library that works for all databases, you'll have to use one for the specific database you're using.
    The library files and includes can usually be found in the installation folder of the database if it's Windows you're using.
    Documentation on how to use the library should be included as well.

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    9
    Well I am using MS SQL database, if that helps.

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Search the internet, there are mysql libraries out there. Infact, if you look at the topics on the first page of this forum, you'll see an SQL topic using some of these.
    Sent from my iPadŽ

  5. #5
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    Quote Originally Posted by OnionKnight
    There is no library that works for all databases, you'll have to use one for the specific database you're using.
    The library files and includes can usually be found in the installation folder of the database if it's Windows you're using.
    Documentation on how to use the library should be included as well.
    Depends on the database license you're using of course, and on the installation options used.
    For MS SQL look in the MSDN documentation.

    And effectively (at least on Windows) there are some common libraries in ODBC, DAO, and ADO (where DAO is severely deprecated and ODBC getting to be that way).

    For how to use those, see your library documentation for your compiler product.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Connect to a sql database
    By Boy67 in forum C++ Programming
    Replies: 4
    Last Post: 08-28-2008, 03:33 PM
  2. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  3. Developing database management software
    By jdm in forum C++ Programming
    Replies: 4
    Last Post: 06-15-2004, 04:06 PM
  4. How to connect with Oracle database
    By Jone in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2002, 06:09 AM
  5. MySQL Connect from Outside Computer
    By juschillin in forum Windows Programming
    Replies: 0
    Last Post: 09-27-2002, 08:02 AM