1

Has anyone have good experience using SQLAPI++ Library? (connecting C++ and SQL)

What do you recommend, I have a local server, SQL server 2008 and Windows XP.

Do you have a funcional example to connect c++ and sql server?, just to do a simple

SELECt * FROM mytable;

in C++?

3
  • Is this from Linux or Windows? I think SQLAPI++ requires client libraries which it doesn't distribute itself. It's more like a wrapper or abstraction instead of having to deal with different libraries yourself. Jul 8, 2011 at 22:12
  • I specified use of Windows....
    – edgarmtze
    Jul 9, 2011 at 3:14
  • MySQL had this kind of API for a long time - tangentsoft.net/mysql++
    – Ulterior
    Jul 10, 2011 at 22:39

3 Answers 3

3

My first impression is that SQLApi++ is great. Here is a bit of background.

I have been using ADO for a long time, but it's starting to give some COM errors for some users, without any helpful information. Also, msado??.tlb is not backwards-compatible so you have to be careful about all your users being on the same version. I understand this might not apply to you, but I figured I would share this anyway.

I started looking into SQLApi++ a few days ago and have almost only good things to say. The only draw-back I have found so far is that there is no way to know how many rows you get back without going to the result set. Also, it isn't free. On the positive side, the API is intuitive, the documentation is good, and the examples are useful. It is blazingly fast by comparison to ADO. Instead of copy/pasting, take a look at http://www.sqlapi.com/Examples/step4.cpp.

1
  • 1
    Not the fault of the SQLAPI. On -almost- all SQL engine, You cannot really know how many rows your SELECT will return. You have to fetch all the datas...
    – Stef
    Oct 8, 2011 at 16:02
2

The SQLApi++ is supported since 2000. The last update was few months ago. The site is not updated most probably because it is good enough as it is - couple of useful examples, documentation, history and support. That it is just a plus if they don't update site very often that means their examples and etc. are not changed, which means the api is stable and you don't have to change your code in order to use the latest technologies.

1

Sounds good, indeed, but the site hasn't been updated for a long time now :(

1
  • 2
    I got an email a couple of weeks ago about a new release. Pretty sure the code is actively being maintained.
    – Paschover
    Nov 25, 2011 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.