-
Use MS Access in C
Just exploring! Can someone PLEASE help me with a tutorial or something on how to use MS Access in C(Windows API)? Do not tell me to use C++. And yes, I have checked Google and am unsuccessful at finding a beginner one. Also, could you not point to any MS website, because for some reason my PC is not loading its website for quite some time now.
-
I would start with this one (it shows how to access your MS access database via ODBC). It uses MFC which is C++, but you should be able to get the basic idea
How To Export and Import Access Tables Using DAO or ODBC
For doing the above using C api take a look maybe at this tutorial
ODBC from C Tutorial Part 1
-
Hi c99tutorial! Well, I had checked both your links in the past and it was not helpful to me at all. I am just looking for a simple solution. I am looking for some plain win32 api stuff. I recently found out about this DDE stuff but find it difficult to understand, altough it seems to have been there in VB3 too. Do you happen to know any links to simple examples of it.
-
Do you really need to access Access, or would another relational database system work for you?
-
Actually I don't need... But I am attached to MS Access' usability. So I want to know if there is a simple way in which I could write small C win32 GUI apps which could connect to my MS Access databases. I know there are other options like raw flat files(too much management, too much time to create) and SQLite but I am looking one for Access. I used to using Access via some other languages.
-
A Web search turned the following up for me. It is a library for accessing MS Access files using a Java interface. They might be using a C library in the backend that you could make use of if you want to use it in your application (does not seem to require ODBC) ; check the references on that page for more information.
Java Library for MS Access
-
c99Tutorial - what you tell me to do is overwhelming and a over the head bouncer:confused: as I find it difficult reading other people's huge projects. But I will try... :) See you guys next year after I finish trying to read the code :redface:
-
If your goal is easy database solution is there a reason you're not using a language that has this built in already? Many dynamic languages have out-of-the-box database support. On the other hand if your goal is to learn C then maybe looking at ODBC connections and 3rd party libraries is not the easiest approach??
-
I understand you. I was just exploring my options..I mean I wanted to know what "I" was comfortable doing in C. To all the replies - THANK YOU!
-
Ah, cold sweat time. Haven't been moist for a while... :redface:
To access an Access database (.mdb), the most common interface for C/C++ was ActiveX Data Objects (ADO).
This exposed a load of COM objects that you could use to connect, run queries, retrieve rows and such.
It might be worthwhile using that in C++, but not C.
I actually wrote the equivalent C code during my "C IS TEH ONE TREU LANGUAGE!!111!!1!" phase, was something like eight times as long, painful to maintain and provided no discernable performance improvement.
Chalk that one down to life experience. ;)