Skip to main content
gamedev.net
🔒 Locked

Database with C++ - need tutorial

Started by vincent_valentine Jun 10, 2004 at 8:58 AM 3 replies 450+ views
Original Post
vincent_valentine
vincent_valentine
I know this is stupid... but the games i''m trying to plan requires tons of infomations.. and i think a database is great. But I don''t know how databases work with C++. So can anyone tell me where to get tutorials for database working with C++, at least for MS Access. Thanks!
:: Try not. Do. Or do not. There is no try. :: (Yoda)http://80.100.152.172/nguyenkhanhduy
evolutional
evolutional
Generally, we use ODBC. Look up ODBC on MSDN.

If the database type doesn't matter, you can use MySQL (has a native C interface) or something like sqlLite which is a small embeddable db engine.

[edited by - downgraded on June 10, 2004 10:07:28 AM]
vincent_valentine
vincent_valentine
Maybe games that uses database are too slow, but is there some way to use the database for the ease of designing?

Anyway, where is the articles for storing games data in runtime and in files?
:: Try not. Do. Or do not. There is no try. :: (Yoda)http://80.100.152.172/nguyenkhanhduy
evolutional
evolutional
Do you mean like they did in Age of Empires? Used a live database to alter game variables and then ''flattened'' it into a file the final game. I think I saw an article about this on Gamasutra.

You will need a common data access interface so that the game doesn''t have to undergo major changes when you switch from live database to flat file.

SQLLite uses a single file for a database, it''s pretty much fully SQL compliant - the only drawback is that there''s no visual interface or ODBC connectors like access - so oyu''ll have to hand-craft your SQL statements.
vincent_valentine
vincent_valentine
Can anyone give me a tutorial or at least a link? I''m working with databases in ASP before, and it comes with no problem. But I''m just a beginner C++ programmer, so...

Can you show me where to look in the article database here?
:: Try not. Do. Or do not. There is no try. :: (Yoda)http://80.100.152.172/nguyenkhanhduy

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.