sqlany_initialize_interface( SQLAnywhereInterface *, const char *) method

Initializes the SQLAnywhereInterface object and loads the DLL dynamically.

Syntax

public int sqlany_initialize_interface ( SQLAnywhereInterface * api, const char * optional_path_to_dll)

Parameters

Returns

1 on successful initialization, and 0 on failure.

Usage

Use the following statement to include the function prototype:

                 
#include "sacapidll.h"

This function attempts to load the SQL Anywhere C API DLL dynamically and looks up all the entry points of the DLL. The fields in the SQLAnywhereInterface structure are populated to point to the corresponding functions in the DLL. If the optional path argument is NULL, the environment variable SQLANY_DLL_PATH is checked. If the variable is set, the library attempts to load the DLL specified by the environment variable. If that fails, the interface attempts to load the DLL directly (this relies on the environment being setup correctly).

Examples of how the sqlany_initialize_interface method is used can be found in the C API examples in the sdk\dbcapi\examples directory of your SQL Anywhere installation.