Link to home
Start Free TrialLog in
Avatar of fattumsdad
fattumsdad

asked on

C++ and Access

Hello all,

Is there a way to write to an Access 2000 database using straight C++?  I would like to do it without using MFC, just straight console.  Any and all help is greatly appreciated!  Thanks in advance!

Tony
Avatar of Indrawati
Indrawati

Any reason why you don't want to use MFC? Since Access is made by Microsoft, I doubt you can easily manipulate access databases without MFC, unless you know the internal data structure of Access.
ASKER CERTIFIED SOLUTION
Avatar of drichards
drichards

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just a note about the code as I look at it:  You'll need to create a udl file and change the code to open it rather than "F:\MyDB.udl".  Easiest way is to go into file explorer right pane and right click and do New->Text File and rename the file to <your name>.udl.  Then double-click on the empty udl file and you'll get a configuration dialog.  On the Provider tab, select "Microsoft Jet 4.0 OLE DB Provider".  If you're using Access prior to Acces 2000, use Jet 3.51 provider.

Then on the Connection tab select the Access file and test the connection.  That will get you going.

You'll also want to change the query for the CCommand to something that will work on your database.
Avatar of fattumsdad

ASKER

drichards,

I appreciate all the help!  Thanks a lot!!

Regards,
Tony