Details
gda_connection_new()
Gda_Connection* gda_connection_new (CORBA_ORB orb); |
Allocates space for a client side connection object
gda_connection_free()
void gda_connection_free (Gda_Connection *cnc); |
If the connection is open the connection is closed and all
associated objects (commands, recordsets, errors) are deleted. The
memory is freed. The connection object cannot be used any more.
gda_connection_list_providers()
GList* gda_connection_list_providers (void); |
gda_connection_set_provider()
void gda_connection_set_provider (Gda_Connection *cnc,
gchar *name); |
Registers name as the provider for this connection. This
should be the GOAD id of the CORBA server to
use
gda_connection_get_provider()
const gchar* gda_connection_get_provider (Gda_Connection *cnc); |
Retuns the provider used for this connection
gda_connection_set_default_db()
void gda_connection_set_default_db (Gda_Connection *cnc,
gchar *dsn); |
Registers the DSN as the name of the default DB to access when the connection is opened
gda_connection_open()
gint gda_connection_open (Gda_Connection *cnc,
gchar *dsn,
gchar *user,
gchar *pwd); |
The function activates the correct CORBA server (defined with he
#gda_connection_set_provider() function. Then it
tries to open the database using the DSN or the default database
as a data source. If user or pwd is not NULL, it will overwrite the
appropriate entry in the DSN passed as par2. Entries in the DSN have the form
<key> = <value> seperated from the database name . Currently the DSN is not
parsed.
gda_connection_close()
gint gda_connection_close (Gda_Connection *cnc); |
Closes the connection object and all associated Gda_Recordset objects.
Gda_Command objects are not closed, but can't be used anymore. Transactions
pending on this objects are aborted and an error is returned.
gda_connection_open_schema()
Gda_Recordset* gda_connection_open_schema (Gda_Connection *cnc,
GDA_Connection_QType t,
...); |
Retrieves meta data about the data source to which the
connection object is connected.
The constraints is a list of enum/string pairs.
The end of the list must be marked by the special value
GDA_Connection_no_CONSTRAINT
gda_connection_open_schema_array()
Gda_Recordset* gda_connection_open_schema_array
(Gda_Connection *cnc,
GDA_Connection_QType t,
Gda_Constraint_Element*); |
Retrieves meta data about the data source to which the
connection object is connected.
The elems is an array of Constraint_Element item. The last item
must have it's type element set to GDA_Connection_no_CONSTRAINT
If elems is NULL, no constraints are used.
gda_connection_get_errors()
GList* gda_connection_get_errors (Gda_Connection *cnc); |
Returns a list of all errors for this connection object. This
function also clears the error list. The errors are stored in LIFO
order, so the last error which happend is stored as the first
element in the list. Advancing the list means to get back in time and
retrieve earlier errors.
The farther away from the client the error happens, the later it
is in the queue. If an error happens on the client and then in the
CORBA layer and then on the server, you will get the server error
first.
gda_connection_list_datasources()
GList* gda_connection_list_datasources (Gda_Connection *cnc); |
List all datasources which can be used with this connection object.
gda_connection_begin_transaction()
gint gda_connection_begin_transaction
(Gda_Connection *cnc); |
gda_connection_commit_transaction()
gint gda_connection_commit_transaction
(Gda_Connection *cnc); |
gda_connection_rollback_transaction()
gint gda_connection_rollback_transaction
(Gda_Connection *cnc); |
gda_connection_get_dsn()
#define gda_connection_get_dsn(cnc) ((cnc) ? cnc->database : 0) |
gda_connection_get_user()
#define gda_connection_get_user(cnc) ((cnc) ? cnc->user : 0) |