-
Databases
I was wondering if anyone give me the code for simple databses. I want to be able to do is read a field in a certain row. I know some sql but I do not know how to use it in c++.
My database is called game.mdb, table ch1. I want to read the field Health where name = "Silas". for example. How would be able to get this information into a int variable?
Thanks for any help.
-
You need to decide what kind of database connection you want. MS supports mainly ADO now, you can find a lot of it in MSDN. Then there are ODBC, DAO, OLE DB etc. MFC has some wrapper classes around DAO, it's pretty easy to use. MySQL databases can be accessed through an API that you can download at their page.
-
Personally, I don't really care which type of database I use. All i want to be able to do is just basic accessing of the database. If some one could tell me a site to go to that has good tutorials or give me the code for just basic accessing of the database, that would be great.