Subject | Re: [IBO] What's a connection for? |
---|---|
Author | Helen Borrie |
Post date | 2005-08-22T07:03:01Z |
At 05:35 AM 22/08/2005 +0000, you wrote:
the connectivity from your application to the server and the database, by
way of the API (which is what the client library is).
When there's not a TIB_Connection object, per se, you'll find there is a
TIBODatabase - which wraps together a single, embedded TIB_Transaction and
an IB_Connection. This hybrid class is for compatibility with the old BDE
model.
Path and Protocol. Also, by one means or another, the connection will need
a User and Password. The other property that will be essential if your
database has a default character set will be the CharSet property: it must
be set to match the database's charset.
statement object will use the connection's default transaction. You're
doing pretty OK here if you use an explicit transaction object hanging off
YourConnectionObject.DefaultTransaction.
Helen
>Alas, after reading so much about transactions and the like, I amOnly when you want to connect to a database. :-)
>still wondering when do I need to use the TIB_Connection component.
>Looking at samples, I see that sometimes there is a connectionThere is always a connection *object* in an IBO app. It is what provides
>component sometimes not.
the connectivity from your application to the server and the database, by
way of the API (which is what the client library is).
When there's not a TIB_Connection object, per se, you'll find there is a
TIBODatabase - which wraps together a single, embedded TIB_Transaction and
an IB_Connection. This hybrid class is for compatibility with the old BDE
model.
>Forgive my ignorance, which specific item inTIB_Connection, in the help file. The essential properties are Server,
>the help file, online faq or any other resource I need to look into to
>once and for all enlighten myself in this regard?
Path and Protocol. Also, by one means or another, the connection will need
a User and Password. The other property that will be essential if your
database has a default character set will be the CharSet property: it must
be set to match the database's charset.
>One specificAs long as the IB_Connection property is set (and it should be), the
>question: If an ib_transaction is present, and an ib_connection is
>present which has its defaulttransaction set to the ib_transaction,
>and I have ib_queries with ib_connection property set to
>ib_connection, ib_transaction property nil, what happens to their
>transaction? Will one be created for each query or use the
>defaulttransaction of the ib_connection?
statement object will use the connection's default transaction. You're
doing pretty OK here if you use an explicit transaction object hanging off
YourConnectionObject.DefaultTransaction.
Helen