View Full Version : Accessing databases on the net from a c++ app (URGENT!!)

03-26-2004, 01:39 PM
I'm already accessing my MSAccess DB using asp.net/ado.net with the oledb classes and methods, but I'd like to do something similar from a C++ app written on my PC. I'm a little bewildered though:[list=1]
ADO, OLE, ODBC... it seems these can all be used for my db, what's the difference?
Presuming I was to use oledb or odbc, where do I start (I don't have VS.net only 6.0)?
What's the process for connecting & performing queries on a remote (or local) db? Akin to the way it's done from a web-page?
Where can I find good tutorials (my c++ & sql is excellent just not how it all links together!)?

Just to clarify, I'm not currently using mfc if possible. I want the process to be:
1)Create a connection to the database (preferably on the net but a local location would suffice - NOT setting up the project for a specific DB)
2)Create a command to get information from the db
3)Execute the command and get hold of the data
4)Go through the data
5)Close the connections.

All the examples I've seen have you building a VS project about some particular database wheras I want to be able to select a database from somewhere and do stuff to it. There must be standard classes around to do this like how you do in asp; I'm not after writing a load of code to do that. In asp.net you just create a connection, command object etc then pass the command to the connection and get a set of data back - that's what I'm after here.


03-29-2004, 08:22 PM
I just quickly entered a search on Google, and came up with these links:

It looks to me as if it depends on what database you're going to use, and you should get the appropriate API for it.

I've never done anything like this using C++, so I apologise, I cannot be of more assistance.

Good luck,