Subject | Re: [IBO] Error SQL -502 |
---|---|
Author | viruxfr54 |
Post date | 2005-05-27T10:03:45Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
how can i set the IB_Session property to component in a datamodule ?
by setting the TIB_Session.DefaultConnection to my Connection ?
best regards
virux
> At 09:24 AM 27/05/2005 +0000, you wrote:connection, a
> >hi all,
> >
> >sorry for my english :(
> >
> >i've a probleme with multithread application
> >
> >i create 1 to 8 thread, each thread create dynamicaly a
> >transaction and some querys.cursorname.
> >
> >if in my application, i create 1 thread it's OK.
> >if i create more than 1, i've this error :
> >
> >----------------------------
> >ISC ERROR CODE:335544569
> >
> >ISC ERROR MESSAGE:
> >Dynamic SQL Error
> >SQL error code = -502
> >Attempt to reopen an open cursor
> >----------------------------
> >
> >in other forum, someone say it's because Query build a cursor for
> >reference by server, and for build the cursor a random is use (
> >Queryname + RandomString(8), but the query is dynamic so they don't
> >have a name at create and more than 1 query have the same
>(
> An interesting conjecture. :-)
>
> >so i've add Randomize; before creating query, but that don't work :
>distinct from
> :-)
>
> You must isolate each thread within its own TIB_Session (also
> the IB_Session that IBO creates for the main thread). You'll findthe
> TIB_Session component on the iboCore palette.the
>
> It's simple, as long as you are careful to have the TIB_Session as
> *first* object created in the thread (fix up the Creation Order ifneed
> be.) Then, set the IB_Session property of your connection objectto this
> session object...and so on.thaks a lot!! that's work :)
>
> Helen
how can i set the IB_Session property to component in a datamodule ?
by setting the TIB_Session.DefaultConnection to my Connection ?
best regards
virux