Subject Re: [IBO] Refreshing a tib_connection?
Author Helen Borrie
At 09:03 AM 14-11-00 -0500, you wrote:


is there a way to "refresh" a tib_connection without closing it, so that if for example I modify a storedproc it will use the new version instead of the older version who was loaded in memory when the connection was first openned?

Database objects don't get loaded into memory when a connection opens.  Your SQL statements access them from the client and bring back datasets, messages and some metadata information, e.g. the server can "pre-process" information during the Prepare stage of a transaction, about data types, indexes, table structures, procedure parameters;  but not about triggers or the content of procedures.  

If you have a statement that modifies metadata, it needs to be isolated in its own transaction.  Once that transaction is committed, all transactions that begin after that point will see the new metadata.  You won't be able to commit any metadata changes to objects that are in use by other transactions.

The golden rule is:  don't modify metadata when users have transactions open.  This generally translates to:  get the users off the system while changing metadata involving tables they might be expected to use.

any help would be greatly appreciated.

Read up on transactions in the first sections of the Help file. It will help a lot in your understanding of how the client (your application) and the server handle the work together.



Joel Gauvreau.

eGroups Sponsor
All for Open and Open for All
InterBase Developer Initiative ยท