gda-sharp2.6.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.
The Gda.Connection class offers access to all operations involving an opened connection to a database. Gda.Connection objects are obtained via the Gda.Client class.
Once obtained, applications can use Gda.Connection to execute commands, run transactions, and get information about all objects stored in the underlying database.
GLib.ObjectMethodSystem.Boolean
Rollbacks the given transaction.
a a true if the operation was successfull, false otherwise
This means that all changes made to the underlying data source since the last call to or will be discarded.
MethodSystem.Boolean
Starts a transaction on the data source, identified by the xaction parameter.
a a true if the transaction was started successfully, false otherwise
Before starting a transaction, you can check whether the underlying provider does support transactions or not by using the method.
MethodSystem.Int32
Executes a single command on the underlying database, and gets the number of rows affected.
a
a a the numer of affected rows by the executed command, or -1 on errorTo be addedMethodSystem.Boolean
Changes the current database for the given connection. This operation is not available in all providers.
a a true if successful, false otherwiseTo be addedMethodSystem.Boolean
Drops a database from the given connection.
a a true if successful, false otherwiseTo be addedMethodSystem.Void
This is just another convenience method which lets you add a list of GdaError's to the given connection.
a
As with , this method makes the connection object emit the "error" signal. The only difference is that, instead of a notification for each error, this function only does one notification for the whole list of errors.
MethodSystem.Boolean
Commits the given transaction to the backend database.
a a true if the transaction was finished successfully, false otherwise
You need to do first.
MethodSystem.Void
Adds an error to the given connection. This function is usually called by providers, to inform clients of errors that happened during some operation.
a
As soon as a provider (or a client, it does not matter) calls this function, the connection object (and the associated Gda.Client object) emits the "error" signal, to which clients can connect to be informed of errors.
MethodSystem.Boolean
Creates a new database named name on the given connection.
a a true if successful, false otherwiseTo be addedMethodSystem.Boolean
Asks the underlying provider for if a specific feature is supported.
a a true if the provider supports it, false if notTo be addedMethodGda.DataModel
Executes a single command on the given connection.
a
a a
This method lets you retrieve a simple data model from the underlying difference, instead of having to retrieve a list of them, as is the case with MethodSystem.Boolean
Closes the connection to the underlying data source. After calling this function, you should not use anymore the Gda.Connection object, since it may have been destroyed.
a true if succesfull, false otherwise.To be addedMethodGLib.List
Executes a command on the underlying data source.
a
a a of
This method provides the way to send several commands at once to the data source being accessed by the given object. The specified can contain a list of commands in its "text" property (usually a set of SQL commands separated by ';').
MethodGda.DataModel
Asks the underlying data source for a list of database objects.
a
a a containing the data required
This is the function that lets applications ask the different providers about all their database objects (tables, views, procedures, etc). The set of database objects that are retrieved are given by the 2 parameters of this function: schema, which specifies the specific schema required, and params, which is a list of parameters that can be used to give more detail about the objects to be returned.
MethodSystem.Boolean
Creates a BLOB (Binary Large OBject) with read/write access.
a a false if database does not support BLOBs, true otherwise and the Gda.Blob is created and ready to be usedTo be addedConstructorTo be added
a To be addedConstructor
Creates a new Gda.Connection object.
a
a
a
a
a
a
It is not intended to be used directly by applications. Use PropertySystem.String
Gets the connection string used to open this connection.
a
The connection string is the string sent over to the underlying database provider, which describes the parameters to be used to open a connection on the underlying data source.
PropertyGLib.List
Retrieves a list of the last errors ocurred in the connection.
a
You can make a copy of the list using .
PropertyGda.ConnectionOptions
Gets the used to open this connection.
a To be addedPropertySystem.String
Gets the Data Source Name the connection object is connected to.
a To be addedPropertySystem.String
Gets the name of the currently active database in the given Gda.Connection.
a To be addedPropertySystem.String
Gets the user name used to open this connection.
a To be addedPropertyGda.Client
Gets the Gda.Client object associated with a connection. This is always the client that created the connection, as returned by
Associates a Gda.Client with this connection. This property (setter) is not intended to be called by applications.
a To be addedPropertySystem.String
Gets the password used to open this connection.
a To be addedPropertySystem.String
Gets the version string of the underlying database server.
a To be addedPropertySystem.String
Gets the provider id that this connection is connected to.
a To be addedEventGda.ErrorHandlerTo be addedTo be addedGLib.Signal(CName="error")PropertySystem.Boolean
Checks whether a connection is open or not.
a true if the connection is open, false if it's notTo be addedPropertyGLib.GTypeGType Property.a Returns the native value for .MethodSystem.VoidDefault handler for the event.
a Override this method in a subclass to provide a default handler for the event.ConstructorProtected Constructor.
a Chain to this constructor if you have manually registered a native value for your subclass.System.Obsolete(Message=null, IsError=False)