ASA Programming Guide
Embedded SQL Programming
Library function reference
unsigned int db_get_property(
SQLCA * sqlca,
a_db_property property,
char * value_buffer,
int value_buffer_size );
This function is used to obtain the address of the server to which you are currently connected. It is used by the dbping utility to print out the server address.
The function can also be used to obtain the value of database properties. Database properties can also be obtained in an interface-independent manner by executing a SELECT statement, as described in Database properties.
The arguments are as follows:
a_db_property An enum with the value DB_PROP_SERVER_ADDRESS. DB_PROP_SERVER_ADDRESS gets the current connection's server network address as a printable string. Shared memory and NamedPipes protocols always return the empty string for the address. TCP/IP and SPX protocols return non-empty string addresses.
value_buffer This argument is filled with the property value as a null terminated string.
value_buffer_size The maximum length of the string value_buffer, including the terminating null character.