c或C++能与SQL Server结合使用吗?

sw252730 2003-08-27 04:28:37
我在用C设计一个程序,需要使用到SQL Server对数据进行操作,能否实现?
...全文
115 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
txlicenhe 2003-08-27
  • 打赏
  • 举报
回复
大把的人用C/C++连SQL。
happydreamer 2003-08-27
  • 打赏
  • 举报
回复

你在SQL 2000的帮助里找ESQL/C就可以找到


a good article in MSDN:
Setting Up the nsqlprep Precompiler
Before you run the nsqlprep precompiler, do the following:

The nsqlprep precompiler uses your compiler to process header files

Set the INCLUDE environment variable to include the full path where the Sqlca.h and Sqlda.h ESQL/C header files are located and set the LIB environment variable to include the full path where the library files are located. There are several ways to accomplish this, including either:
Issuing a SET statement at the command prompt, such as
SET INCLUDE = C\Mssql17\DevTools\INCLUSE; %include%

SET LIB = C\Mssql17\DevTools\LIB; %LIB%

At the command prompt, first running Vcvar32.bat (in the \Program Files\Microsoft Visual Studio\VC98\Bin directory) and then running setenv.bat (in \Mssql17\DevTools\Samples\Esqlc directory).
The nsqlprep precompiler automatically includes these header files in the C programs it creates. Do not explicitly include them (by using #include) in an Embedded SQL program.

To enable communication with Microsoft® SQL Server™ 2000, ensure that an appropriate Net-Library is loaded or available on the path when precompiling with the /DB and /PASS options. For example, the Named Pipes Net-Library for the Microsoft Windows NT® operating system (Intel® platform) is Dbnmpntw.dll, and the Named Pipes Net-Library for the Microsoft MS-DOS® operating system is the Dbnmpipe.exe TSR.
sunrise10 2003-08-27
  • 打赏
  • 举报
回复
学习
hjb111 2003-08-27
  • 打赏
  • 举报
回复
能实现!通过api来访问!

34,874

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧