Contents IndexPart V.  The SQL Anywhere Programming Interfaces Chapter 34.  The Embedded SQL Interface

User's Guide
   Part V. The SQL Anywhere Programming Interfaces
    Chapter 33. Programming Interfaces

There are several programming interfaces to SQL Anywhere:

Embedded SQL

Embedded SQL is a system in which SQL commands are embedded right in a C or C++ source file. A preprocessor is run which translates these statements into calls to a runtime library. Embedded SQL is an ANSI and IBM standard. It is portable to other databases and other environments. Embedded SQL is the lowest level interface to the SQL Anywhere database engine and is functionally equivalent in all operating environments. It provides all functionality that is available in the product. Embedded SQL is quite easy to work with, although it takes a little getting used to the idea of Embedded SQL statements (rather than function calls) in C code.

ODBC

ODBC (Open Database Connectivity) is a standard call level interface (CLI) developed by Microsoft. It is based on the SQL Access Group CLI specification. ODBC applications can run against any data source that provides an ODBC driver. You should use ODBC if you would like your application to be portable to other data sources that have ODBC drivers. Also, if you prefer working with an API, use ODBC. The ODBC interface is fairly low level---about the same as Embedded SQL. Almost all of the SQL Anywhere functionality is available with this interface. ODBC is available as a DLL under Windows, OS/2 and Windows NT and as a library for DOS and QNX.

Dynamic Data Exchange

The Dynamic Data Exchange (DDE) Server can be used from Windows applications that provide DDE client services. Some examples are Microsoft Word, Microsoft Excel and Lotus 1-2-3 for Windows. The DDE interface is set oriented --- the entire results of a query are returned to the application at once. The results are returned on the clipboard or in memory. Use the DDE interface from any Windows application that has DDE support and can handle a set of information being returned.

High-level interface (HLI)

The WSQL HLI Dynamic Link Library (DLL) provides a simple, high-level interface to SQL Anywhere in Windows, OS/2 or Windows NT. It is either set or record-at-a-time oriented. You can choose how you would like to retrieve results. The record-at-a-time interface provides more control for use in systems like Visual Basic where data entry applications are being built. You can use the DLL from any application that supports linkage to a DLL. You can also use this DLL from any programming language. If this DLL does not provide everything you need, use the ODBC interface (also a DLL).

Contents IndexPart V.  The SQL Anywhere Programming Interfaces Chapter 34.  The Embedded SQL Interface