I need to start using databases with c++. I know in VB or VBA is simple and easy to find tutorials. I've done a lot of database apps in VBA and VB.
I couldn't find help for c++, only for vc++.
I use Code::Blocks and mingw.
If anyone knows how to start, or have some links, please share.
I want to connect to an Access database. What would be the equivalent in c++ of:
//create connection Dim myCon as New ADODB.Connection //create recordset Dim myRS as New ADODB.Recordset //create connection string Dim myConStr as String //"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFullDBPath & ";" /how do I set up a driver? myCon.ConnectionString=myConStr //create sqlString="SELECT * FROM SomeTable ...." myCon.Open myCon.execute sqlString myRS.Open "" _ & "SELECT * " _ & "FROM tblTemp " _ & "WHERE some_condition " , myCon, adOpenKeyset, adLockOptimistic, -1 Do While Not myRS.EOF //some code myRS.MoveNext Loop Set myRS=Nothing myCon.Close
I know there are some "sql.h" headers used with "windows.h" but how is a connection declared & initialized?
Please don't tell me to google it because I don't know what to google about.