mySQL query's from c++

Grab your favourite IDE and tinker with the innards of game engines

mySQL query's from c++

Postby davidc538 on Sun Nov 07, 2010 6:02 am

Hey everyone, I'm trying to run mySQL queries from inside my game code but I've been having a ton of problems with each connector I've tried. Does anyone know of a connector (odbc/jdbc/anything that works with mysql) that is easy to use? I was trying to use the ones from mysql (which i've had working before) but i've been running into too many problems gettin them to work.
User avatar
davidc538
Been Here A While
Been Here A While
 
Joined: Mon Aug 11, 2008 4:27 pm

Re: mySQL query's from c++

Postby zombie@computer on Sun Nov 07, 2010 9:11 am

does it have to be c++ (not sure if you mean by gamecode sourcesdk)? Allmost all other languages out there have built-in sql support ...

Anyway, ive got no experience with c++ and mysql, but what are the problems you are having with the connectors from mysql? (or any other you tried) ?
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: mySQL query's from c++

Postby davidc538 on Mon Nov 08, 2010 10:03 am

yeah i should have specified this is for source so it does have to be c++, i recently though it might be a good idea to develop a library in c# (Considering this task is a joke in c#) and linking my mod against it for the part where it sends the insert to the database although since the dll's are for win32 and c# apps are all CLR i don't think it can be done that way.

The C++ connector from mysql has been anything but a delight to use, i can compile it into my mod but if i call my function where i send the insert its causing the game to crash on startup(long before the function can even be called!). Also in my test application its crashing as well when i try to execute a query.

Another thing that i dislike about the mysql connector is that it requires boost to compile, not that boost is bad but it shouldn't be required.

Any other solutions/ideas for this would be greatly appreciated.
User avatar
davidc538
Been Here A While
Been Here A While
 
Joined: Mon Aug 11, 2008 4:27 pm

Return to Programming

Who is online

Users browsing this forum: No registered users