开发者

SQL Server Native Client API examples

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, 开发者_如何学JAVAexecute queries and retrieve results using this API.

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

Thanks in advance,

Ernesto


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.

Edit Since this post was made (both question and answers), OLE DB has been deprecated by Microsoft. So going forward, it probably makes sense to use a solution that does not go through OLE DB. This blog post talks about it some.


I think you are looking for the ODBC API.

You can find many tutorials on Google by typing:

ODBC API reference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜