Initializes the interface.
sacapi_bool sqlany_init( const char * app_name, sacapi_u32 api_version, sacapi_u32 * version_available )
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.
1 on success, 0 otherwise
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; } |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |