sqlany_init function

Initializes the interface.

Syntax
sacapi_bool sqlany_init( const char * app_name, sacapi_u32 api_version, sacapi_u32 * version_available )
Parameters
  • app_name   A statement object executed by sqlany_execute or sqlany_execute_direct.

  • api_version   The version of the compiled application (use SQLANY_CURRENT_API_VERSION).

  • version_available   The maximum supported API version.

Returns

1 on success, 0 otherwise

See also
Example
SQLAnywhereInterface  api;
a_sqlany_connection   *conn;
unsigned int          max_api_ver;

if( !sqlany_initialize_interface( &api, NULL ) ) {
    printf( "Could not initialize the interface!\n" );
    exit( 0 );
}

if( !api.sqlany_init( "MyAPP", SQLANY_CURRENT_API_VERSION, &max_api_ver )) {
    printf( "Failed to initialize the interface! Supported version = %d\n", max_api_ver );
    sqlany_finalize_interface( &api );
    return -1;
}