Sample APIs for SQL Server Native Client

I am writing a C ++ application that must execute SQL queries in a SQL Server database, and I want to do this using my own SQL Server client.

The MSDN documentation does not have full help on this issue and there are several examples, so I'm looking for some site that contains additional information on how to connect, execute queries and retrieve results using this API.

Do you guys know where I can find out more about this?

Thanks in advance,

Ernesto

+7
c ++ sql
source share
2 answers

In addition to ODBC, as Brian mentions, you can also use OLE DB and / or ADO (which actually simplifies the use of OLE DB). Three options: briefly introduced in this blog entry .

Of the ODBC, OLE DB, and ADO options, I think the easiest way would be to use ADO. Using ODBC or OLE DB directly, in my opinion, is a somewhat painful process. This can certainly lead to very fast code, but you pay for it during development. This page contains some simple examples.

Change Since this post was made (both the question and the answers), OLE DB is deprecated by Microsoft. Therefore, in the future, it probably makes sense to use a solution that does not go through OLE DB. This blog post says it.

+4
source share

I think you are looking for an ODBC API .

You can find many guides on Google by typing:

ODBC API Reference

+4
source share

All Articles