Obtains information about the database interface or the server to which you are
connected.
Syntax
unsigned int db_get_property(
SQLCA * sqlca,
a_db_property property,
char * value_buffer,
int value_buffer_size );
Parameters
- sqlca – A pointer to a SQLCA structure.
- a_db_property – The property requested, either DB_PROP_CLIENT_CHARSET, DB_PROP_SERVER_ADDRESS, or DB_PROP_DBLIB_VERSION.
- 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 room for the terminating null character.
Returns
1 if successful; 0 otherwise.
Remarks
The
following properties are supported:
- DB_PROP_CLIENT_CHARSET – This property value gets the client character set (for example, "windows-1252").
- DB_PROP_SERVER_ADDRESS – This property value gets the current connection's server network address as a printable
string. The shared memory protocol always returns the empty string for the address. The
TCP/IP protocol returns non-empty string addresses.
- DB_PROP_DBLIB_VERSION – This property value gets the database interface library's version (for example, "16.0.0.1297").