Database Connectivity with C++

P

Pradyumna

Hi,
i want to write an application using pure C++ code. Here i'hv to use
MS Access as Database.
So all database functionalities ( i.e
adding,retrieving,modifying,deleting etc... ) should reflect on this
application.

Any one can please help me out ,what should be the C++ code for my
application.
please help me as soon as possible.

Thank you

Regards
Pradyumna
 
B

Bob Hairgrove

Pradyumna said:
Hi,
i want to write an application using pure C++ code. Here i'hv to use
MS Access as Database.
So all database functionalities ( i.e
adding,retrieving,modifying,deleting etc... ) should reflect on this
application.

Any one can please help me out ,what should be the C++ code for my
application.
please help me as soon as possible.

Thank you

Regards
Pradyumna

If you build on top of ODBC, which is a C language library, you could
also use different databases if your application ever outgrows MSAccess
(a lot of them do, eventually). Check out the "ODBC Programmer's
Reference" on MSDN.

There's also the COM interface to Access (ADO libraries) which Microsoft
has published. However, I find ODBC to be much more straightforward, and
you won't need the .NET stuff for that.
 
J

jason.cipriani

Hi,
i want to write an application using pure C++ code. Here i'hv to use
MS Access as Database.
So all database functionalities ( i.e
adding,retrieving,modifying,deleting etc... ) should reflect on this
application.

Any one can please help me out ,what should be the C++ code for my
application.
please help me as soon as possible.

This is not really an appropriate topic for this newsgroup. Topics for
comp.lang.c++ are the syntax and semantics of the C++ language itself,
and the C++ language does not deal with database connectivity.

That said, I can give you a brief answer. You can use ODBC, you can
use OLEDB, there are some MFC classes, you can one of the many
available data-bound CLR components if you are using Visual Studio
(start a Windows Forms application and explore the toolbox), you can
use one of the many available data-bound VCL components if you are
using C++ Builder.

Personally, I use SQLAPI++ (http://sqlapi.com/) frequently, which is
not free, but is an incredibly straightforward and well-documented API
that supports a number of database back-ends, including MS Access.

You can also find a list of various APIs here:

http://www.dmoz.org/Computers/Programming/Languages/C++/Class_Libraries/Database/

And by Googling for appropriate keywords (there is even an MFC code
example on the first page of results):

http://www.google.com/search?hl=en&q=ms+access+c++&btnG=Google+Search&aq=f&oq=

From your post, it sounds like you will need to read up on ORM
databases in general, MS Access, ODBC, and possibly a few other things
first.

If you have any additional questions, you should ask them on a more
appropriate newsgroup / forum / mailing list (e.g. the MSDN forums
http://forums.microsoft.com/MSDN/default.aspx?SiteID=1 or the
appropriate place for whatever API you end up using).

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top