[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

access Postgres through MFC with libpqxx or OLE DB?

Hi Experts,

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

Thanks for your opinion!
Mike
0
thready
Asked:
thready
1 Solution
 
earth man2Commented:
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.
0
 
threadyAuthor Commented:
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?
0
 
xeltekCommented:
Hi,
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.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now