Subject | Re: [IBO] DML Caching - Syncing multiple applications |
---|---|
Author | Shaq |
Post date | 2005-08-09T20:43:39Z |
Can you give me some insight on how you set it up?
I did the following:
Change DMLUSER to DML_CONNECTION in IBO$DMLCACHE table.
When my trigger fires it inserts the current connection value into the
field.
On my client application which listens to this I get the following error:
conversion error from string "SYSDBA".
Do I have to set up something else to make it work using the current
connection instead of the current user?
-Shaq
I did the following:
Change DMLUSER to DML_CONNECTION in IBO$DMLCACHE table.
When my trigger fires it inserts the current connection value into the
field.
On my client application which listens to this I get the following error:
conversion error from string "SYSDBA".
Do I have to set up something else to make it work using the current
connection instead of the current user?
-Shaq
--- In IBObjects@yahoogroups.com, Markus Ostenried <chef_007@g...> wrote:
> At 07:22 Tuesday, 09.08.2005 +0000, Shaq wrote:
> >I am not clear on how to implement my own user management for DML
> >Caching. My application logs into Firebird with the same account for
> >each instance. The user has his own unique username/password which I
> >handle myself.
> >
> >I didn't see where the user names are being handled. There are no
> >properties for the TIB_SyncCursor component. How does the
> >TIB_SyncCursor know who to send the the events to? How would I handle
> >DML Caching with my own users instead of the connecting user which is
> >the example in the survey application?
>
> Hi,
>
> when a new record is inserted into IBO$DMLCACHE table then its
> DMLUSER-field will be set to CURRENT_USERNAME. The
AfterInsert-trigger of
> IBO$DMLCACHE table posts an event that the TIB_Synchcursor listens
to. Then
> the SynchCursor reads all new records from IBO$DMLCACHE with a
statement
> like this:
>
> SELECT * FROM IBO$DMLCACHE
> WHERE DMLID > :LastDmlId
> AND DMLUSER <> CURRENT_USERNAME
>
> This ensures that the SynchCursor only reads DMLCache records from
other users.
>
> Like you I'm using only one Firebird user account. So instead of
comparing
> USERNAMEs I store and compare CURRENT_CONNECTION integer values.
>
> HTH,
> Markus