access Postgres through MFC with libpqxx or OLE DB?

Posted on 2011-10-08
Last Modified: 2012-08-13
Hi Experts,

In accessing Postgres with an MFC app, should I choose the libpqxx driver or the OLE DB driver?

Thanks for your opinion!
Question by:thready
    LVL 22

    Expert Comment

    by:earth man2
    With object oriented inheritance can't you do both ?  Overwrite methods that need to use libpq to get performance.

    It all depends if your code needs to be ported to SQL Server.
    LVL 1

    Author Comment

    Right now I don't care about speed.  I thought I rounded it down to the 2 drivers that I *should* choose from for C++ (MFC app), but I just want to make my life as easy as possible.  I want the best c++ driver I can find that allows me to use nice objects and get results from queries.  I'm not sure that OLE DB is right for me...  I was hoping for something simpler.  Any idea?
    LVL 2

    Accepted Solution

    I will also strongly recommended libpq, no libpqxx.
    The reasons are:
    1. the libpqxx was only a c++ wrapper for libpq C/API.
    2. there might be version conflict issue with libpqxx. the libpqxx, which depends on the underlay libpq.lib, might be not compatible with you latest postgreSQL installation.
    3. postgreSQL's (libpq.lib) C/API was really easy to use.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now