Database in C/C++

Discussion in 'Computer Programming, Emulation, and Game Modding' started by Wabsta, Jul 7, 2009.

  1. Wabsta
    OP

    Wabsta you fight like a dairy farmer

    Member
    2,500
    71
    Apr 25, 2008
    Netherlands
    SCUMM Bar
    Okay, so I'm programming a nice little application, and atm, I'm using XML for reading the Data.
    But actually I would like to have something like MySQL, you know, like a database, with tables, where I can easily manage the data, and easily read it from my application.
    But I have no freakin idea what to google for this.

    Oh, it has to be offline btw.
    Anyone has suggestions?
     
  2. emupaul

    emupaul GBAtemp Fan

    Member
    416
    1
    Jun 26, 2009
    United States
    space
    http://www.geocities.com/jahan.geo/mysql_c_by_example.html, I learned from here. the c++ wrapper api sucks ballz use the real deal.

    to get the the libs and header files you need to install the mysql community server.
    http://dev.mysql.com/get/Downloads/MySQL-5...come.com/mysql/

    optional install xampp it sets up a webserver and mysql db on local host 127.0.0.1/ it also includes myphpadmin a webtool to add drop tables etc
    http://www.apachefriends.org/en/xampp.html

    then you can connect after linking the correct libs to your project
    Code:
    MYSQL mysql;
    mysql_real_connect(&mysql,"localhost","username","password","dbname",0,NULL,0));
    you can even set up a no-ip account to get a free domain name that points to your internet ip address so you can connect to your local database from another computer.

    http://www.no-ip.com/

    you must also download a client to keep your server domain name active and up to date in case your ip changes.

    If you have webspace that includes mysql database make sure they allow remote database connection otherwise your c/c++ program will not be able to connect.
    most webspace servers do not offer this because of security reasons.