Connecting MS Access with C/C++ API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madann
    New Member
    • Feb 2008
    • 2

    Connecting MS Access with C/C++ API

    Hi,

    Can anyone provide me the sample code or the procedure i need to follow to connect a MS Access DB with C/C++ API?
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    I believe your options are ADo, OLE DB and ODBC, all of these are described here

    Comment

    • madann
      New Member
      • Feb 2008
      • 2

      #3
      Originally posted by Banfa
      I believe your options are ADo, OLE DB and ODBC, all of these are described here
      Thanks..

      Please do share some sample code in c/c++ which shows how the connectivity is exactly done.

      Moreover if my database file is of .mdb type how should i connect it to my code. Help me out with sample code.

      Thanks in advance.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        Originally posted by madann
        Please do share some sample code in c/c++ which shows how the connectivity is exactly done.

        Moreover if my database file is of .mdb type how should i connect it to my code. Help me out with sample code.
        All of that rather depends on which type of connection you use, personally I have never used MS Access or the API directly, I used the MFC wrapper onto the ODBC API to connect to an SQLServer 2005 database and probably in the next month or 2 I will end up using the .NET ODBC wrapper for the same thing.

        However if you bother to spend a little time reading reference material that I linked to you will find that there are lots of code samples, approximately 1 for every function in the API.

        Comment

        • weaknessforcats
          Recognized Expert Expert
          • Mar 2007
          • 9214

          #5
          Check out the Office SDK.

          There are interface components all set to go.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32668

            #6
            Originally posted by Banfa
            I believe your options are ADo, OLE DB and ODBC, all of these are described here
            Madann,

            When you see text in blue and underlined like that it means you can simply click on the word and it will open a new web page. In this case you can find what you need if you follow the link.

            Welcome to TheScripts.

            Comment

            Working...