Subject RE: [IBO] working in a multithread enviroment
Author IBO Support List
Razvan,
 
I think the biggest issue you are going to face is arranging things so that your cached module instances are properly coordinated if there are multiple data modules involved.
 
As far as IBO goes, as long as each set of module instances has an IB_Session at the main module level then IBO should take care of everything, including putting itself first in the creation order.
 
I'll need to know more details about your access violation in order to give more feedback on that.
 
Jason
 


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of ropopa01@...
Sent: Sunday, November 10, 2013 4:17 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] working in a multithread enviroment

Hi all

I need some help in order to understand an use the IB objects components. Version 4.9. Delphi XE2.

So far I have a normal Desktop application that use TIB_Query (and the same palette components) form normal insert, display, edit, delete.

However I use TIBOQuery for all my reports.

So far no problem in use.


Now I want to reuse ALL my reports into a WebApplication (using Intraweb components). The application is exact the same with the desktop application except is web based.


I'm stuck into an AccesViolation problem. (IB_Session is nil at some level).

I put on my "common data module" the following objects. (in this order).


1. TIB_Session (name = ibspMain)

2. TIBODatabase (name = dbSourceRapoarte)

3. TIBOTransaction (name = trSourceRapoarte)


any report is connected (design time and also at runtime) to all the 3 components from this unit.

the query from the report is named qMain.


CODE

    qMain.IB_Connection := UserSession.dbSourceRapoarte;

    qMain.IB_Transaction := UserSession.trSourceRapoarte;


IBOQuery does not have any property like "IB_SESSION", or Owner or similar.


Question

1. How can I be sure from design time (or run time if possible) that my IB_SESSION is created first (as I see that is required)? and from multiple discussion I understand this is the principal issue.

2. How to arrange my code to work with design time components?

3. Is there any demo project to explain this ?


tks a lot

Razvan