开发者

Connecting and Fetching a record form sequel server 2005

I have a windows application in visual C++. I am not using MFC, in this appli开发者_如何学Gocation I have connect to SQL server 2005 and fetch records form a database file. Can any one guide me how this can done. Thanks in advance.


I would say, you could use some wrapper framework around the odbc calls. Currently I was working on a project where SQL server communication was involved so I found this wrapper framework: TinyODBC which is a minimalistic ODBC wrapper library. It's pretty trivial how can one use it, but I have to admit I had to patch it for a little more functionality. But otherwise it is a useful choice of ODBC communication. Now, you can use the native SQL driver via ODBC. Since it's a minimal framework, if you go through the tutorial you'll be ready to create new application with it. Now


The complete list of accessing methods is listed here. Most popular choices for C++ programmers are SQL Server Native Client and MDAC/Windows DAC, both support OLEDB and ODBC interfaces. A comparison of SQL Server Native Client and MDAC/WIndows DAC is here.

There are other wrappers built on top of OLEDB and ODBC such as ADO or TynyODBC, which can help you to write more readable code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜