Programming DB-Library for C

DB Library for C

DB Library for C

Programming DB-Library for C

Microsoft® SQL Server™ is a powerful structured query language (SQL) database server. With local area network (LAN) software, SQL Server allows clients running the Microsoft Windows NT® 4.0, Microsoft Windows®, or Microsoft MS-DOS® operating systems to access its services. Developers can write applications for SQL Server by programming with DB-Library for C, the C-language version of the communication library for SQL Server.

DB-Library for C is an application programming interface (API) consisting of C functions and macros that allow an application to interact with SQL Server. Included are functions that send Transact-SQL statements to SQL Server and functions that process the results of those statements. Other functions handle errors and convert data.

DB-Library for C offers a rich set of functions for:

  • Opening connections.

  • Formatting queries.

  • Sending query batches to the server and retrieving the resulting data.

  • Using scrollable cursors.

  • Bulk-copying data from files or program variables to and from the server.

  • Controlling two-phase commit operations between several participating SQL Servers.

  • Executing stored procedures or remote stored procedures.

These functions allow the application developer extremely fine-grained control of data flow back and forth between the client and the server. DB-Library supports multiple environments. C programmers can choose from among:

  • A multithread dynamic-link library (DLL) for the Windows NT 4.0 operating system.

  • Medium and large model static-link libraries for MS-DOS for both Microsoft and Borland compilers.

  • A DLL for the Windows operating system.