Archived

This topic is now archived and is closed to further replies.

OB1st

Database/Tables and MSVC++

Recommended Posts

OB1st    122
I want my application to input/output to a table which I do not have yet. I came from Foxpro background. How do I establish a database application with MSVC++. Can any one give my direction of which topics/books I should be looking for? If love is illusion and hate is real, I would rather be crazy

Share this post


Link to post
Share on other sites
MonkeyChuff    158
Read up on both OLE DB and ADO, both of which can be utilised from C++. ADO is a wrapper around OLE DB. The ADO library is single threaded, so don't use ADO if you want multi threaded DB code.

OLE DB is much more flexible from a coding point of view, it can be extended with templates and the like, but it is harder to code against for a newb to the C++/Database world.

Best of luck.

Edited by - MonkeyChuff on January 11, 2002 12:22:28 PM

Share this post


Link to post
Share on other sites
JonStelly    127
I personally prefer using ADO as an import, but the easiest way is to use either the CDatabase or CDaoDatabase classes that are part of MFC. Look up either in MSDN and that should get you started.

Share this post


Link to post
Share on other sites
Brannon    122
To start out using databases in C/C++, you can use ODBC too. Sure it''s much older than OLE DB/ADO... but it works great, and is really easy to use.

Regardless of which data access technology you use, you should be able to access FoxPro tables (if that is convenient for you).

Ie. using ODBC, you use the "Microsoft Visual FoxPro Driver", for OLE DB, you use the "MSDASQL" provider along with the "Microsoft Visual FoxPro Driver" (ADO is the same as OLE DB). I''m not sure if you''ll get access to the xbase language from any of these, but you should be able to execute any SQL-based statements that FoxPro supports.

Have fun!


-Brannon

Share this post


Link to post
Share on other sites