ODBC - Modifying or retrieving a property at run time

Modifying or retrieving an ODBC property at run time

The following commands can be used to set a database property at run time:

database_id->source = text_expression

database_id->type = expression

database_id->flags = expression

These attributes can only be changed when the database is closed.

If the database is initially closed (i.e. declared as –database), its type can be set at run time before it is opened. This allows a program to work with a database that has the type DBT_ODBC in some installations and DBT_SCULPTOR in others.

Databases are closed and opened by means of the close and opendb commands.

See Modifying a property at run time for general information on run time modifications to objects.

The same properties can be retrieved at run time:

database_id->source

database_id->type

database_id->flags

See Retrieving a property at run time for general information on run time modifications to objects.

Additionally, the file_id->:doc:odbc <functions/odbc> function can be used to retrieve the properties of an ODBC database at run time.


RELATED TOPICS

ODBC