Database in C/C++

Wabsta

you fight like a dairy farmer
OP
Member
Joined
Apr 25, 2008
Messages
2,495
Trophies
0
Age
32
Location
SCUMM Bar
Website
www.wabsta.com
XP
449
Country
Netherlands
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?
 

emupaul

Well-Known Member
Member
Joined
Jun 26, 2009
Messages
416
Trophies
0
Location
space
Website
Visit site
XP
144
Country
United States
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    I @ idonthave: :)