tags:

views:

47

answers:

2

Hi everybody:

I am writing a C++ application that needs to execute SQL queries in a SQL Server DB and I want to do it using SQL Server Native Client.

The MSDN documentation has no a full reference on it and has a few examples so I am looking for some site having more information on how to connect, execute queries and retrieve results using this API.

Do you guys know where can I more info on it?

Thanks in advance,

Ernesto

A: 

I think you are looking for the ODBC API.

You can find many tutorials on Google by typing:

ODBC API reference.

Brian R. Bondy
+1  A: 

In addition to ODBC as Brian mentions, you can also use OLE DB and/or ADO (which actually makes OLE DB "easy" to use). The three options are briefly introduced in this blog entry.

Of the ODBC, OLE DB and ADO options, I think the simplest route would be to use ADO. Using ODBC or OLE DB directly is, in my opinion, a somewhat painful process. It can certainly result in very fast code, but you pay for it in development time. This page has some simple examples.

Mark Wilkins