Like Tree1Likes
  • 1 Post By SMurf

Use MS Access in C

This is a discussion on Use MS Access in C within the Windows Programming forums, part of the Platform Specific Boards category; Just exploring! Can someone PLEASE help me with a tutorial or something on how to use MS Access in C(Windows ...

  1. #1
    Registered User laughing_man's Avatar
    Join Date
    Jun 2009
    Location
    Bombay, India
    Posts
    13

    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.

  2. #2
    Registered User
    Join Date
    Nov 2012
    Posts
    1,097
    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

  3. #3
    Registered User laughing_man's Avatar
    Join Date
    Jun 2009
    Location
    Bombay, India
    Posts
    13
    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.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,712
    Do you really need to access Access, or would another relational database system work for you?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User laughing_man's Avatar
    Join Date
    Jun 2009
    Location
    Bombay, India
    Posts
    13
    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.
    Last edited by laughing_man; 1 Week Ago at 02:00 AM. Reason: missed a word

  6. #6
    Registered User
    Join Date
    Nov 2012
    Posts
    1,097
    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

  7. #7
    Registered User laughing_man's Avatar
    Join Date
    Jun 2009
    Location
    Bombay, India
    Posts
    13
    c99Tutorial - what you tell me to do is overwhelming and a over the head bouncer 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
    Last edited by laughing_man; 1 Week Ago at 10:13 AM.

  8. #8
    Registered User
    Join Date
    Nov 2012
    Posts
    1,097
    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??

  9. #9
    Registered User laughing_man's Avatar
    Join Date
    Jun 2009
    Location
    Bombay, India
    Posts
    13
    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!

  10. #10
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,263
    Ah, cold sweat time. Haven't been moist for a while...

    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.
    laughing_man likes this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. dll access help
    By maverick.guru in forum C++ Programming
    Replies: 3
    Last Post: 05-31-2004, 12:36 PM
  2. Can't access the FAQ
    By mlsbbe in forum C Programming
    Replies: 0
    Last Post: 04-04-2003, 06:37 AM
  3. Access VB DLL from C++ ?
    By torbjoen in forum Windows Programming
    Replies: 3
    Last Post: 12-05-2002, 06:14 AM
  4. IP access and DNS access to Cprog.com
    By mithrandir in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-31-2002, 07:22 PM
  5. Access .....
    By GodLike in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 06-20-2002, 09:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21