Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2013

    Lightbulb Unanswered: Language for accessing MS access database

    hello friends,
    I am new to databases. I am working on project which is in OpenCV(basically it is installed in Visual C++ 2010). I wanted database connectivity so I searched through internet and connected MS access database with it with a help of this.

    Accessing a Microsoft Access database from within Visual C++

    And ran code below which was given at that link which is below.

    #include "stdafx.h"

    #include "Table1.h"

    int _tmain(int argc, _TCHAR* argv[])


    CoInitialize(NULL); // Be sure to initialize COM somewhere in your app one time...

    CTable1 table1;

    HRESULT hr = table1.OpenAll();



    hr = table1.MoveNext();

    if (S_OK != hr) break;

    printf("table1.f1=%lu\n", table1.m_f1);

    printf("table1.f2=%S\n", table1.m_f2);


    return 0;


    It perfectly displays content of table.
    I want to insert and query this database. Which functions are used for it.Help me if you can.

    THanks in advance.

  2. #2
    Join Date
    Nov 2011
    Houston, TX
    You might want to take this question to a C++ forum if you're hoping to get an answer.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts