Hello all!
I am currently working on a project for class that involves using programs to interact with a database. I have chosen to use C++ (which may not have been the best option for interacting with DB) and am struggling some trying to connect to the database I have created.
What exactly it is I am trying to do is this:
I have created a VB program that takes data entered by a user and stores it into a Microsoft Access DB. After storing said data, the VB program then opens up a C++ program which takes the data from the database and stores it into variables inside of C++ to use throughout the program. The part I'm having the most trouble with right now, is getting my C++ program to read that data from the DB and store it into variables.
I have been reading up a lot on the different ways to do this, but have not come across anything solid to help me. I'm aware of OLE DB, ADO, etc., but can't seem to grasp the best way to utilize them. I'm simply looking for a way to have my C++ program connect to the database, read the data stored in each field, and store that data into its own variable. I am not trying to use the C++ program to write anything into the database, I'm only looking for a solution on how to read it and store it inside of C++.
Like I said above, I have researched this as fully as I could before coming here to post. I have read up on:
https://msdn.microsoft.com/en-us/library/cc811599(v=office.12).aspx, but cannot find anything conclusive and am not very experienced with this sort of coding. I'm aware C++ is not the best language for this particular program, but it is the language I went with for this project.
Any and all help will be greatly appreciated!