Subject Re: [IBO] Is it a good way ?
Author Helen Borrie
At 11:45 AM 19-06-01 +0700, you wrote:

>Hi list,
>I had rather confused with used IB_Sesssion. Actually with my program.
>Several days ago I was confident enough with my Application. It a billing
>server which build with IB_Objects. This Application never have a crush
>and never hang while running in my office. But yesterday after its
>installed in another place ( our client ), the server became often have a
>crush and the server become hang.
>In that place (our client's place) the workstations which connect to the
>server in the range 20-25 terminal. In our office just 4 terminal.
>I thought that may be a concurency problem. So I try to use IB_SESSION
>to update my Application. Actually until now i don't know exactly what
>the problems are.

You should never need to use an explicit IB_Session unless you are creating completely separate instances of your application in different threads. Concurrency is an attribute of transactions...it is a combination of Isolation, LockWait and RecVersion settings. Normally you should find that applications which browse and occasionally edit will be well-suited by an Isolation of tiCommitted, with LockWait and RecVersion left at their default settings.

>In this list, I have attach the example file which showing my way to
>communicate with Interbase.

This list does not accept attachments.

It would be useful for you to look at the interbase.log file on your customer's server machine and see what it tells you.

>Is my way a good way to connect with interbase for a billing server

The usual way to connect with the database from your application is by way of a TIB_Connection. The TIB_Connection uses its own, internal IB_Session object, which is global to all of the components. You can reach its properties via a TIB_SessionProps object which is connected to that internal session (surface in the connection object as the IB_Session property).

>Can somebody give me some example program which used one IB_SESSION,
>some IB_DSQLs, some IB_QUERYs, one IB_Connection, and one
>IB_Transaction ( If this structure is good, if not please give me
>another structure and the example program )

It is hard to tell what is unusual about your application so that you feel you need to use an extra IB_Session...have you looked at the samples in your IBO folders?

Regards,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________