RequestLive on Oracle databases -- tables with BLOB fields

Hi friends,

I have a serious problem with an application I support.  The current version
was developed with Version 2.01 of Delphi.  The application runs on Oracle
databases.  Most of my customers use version 3.02 or 3.51 of BDE.  I am
pretty sure my problem is a bug in BDE.

When I execute a TQuery to select a Memo from a BLOB in Oracle strange
things happen under very particular circumstances.  If I am logged into
Oracle via BDE using the Oracle userid that created and owns the tables in
Oracle the application works fine.  When I log into Oracle via BDE using an
Oracle userid that has been granted select, update, delete and insert access
by the owner and that uses synonyms in Oracle to connect to the proper
tables the BDE for some reason sends different queries (wrong ones) to
Oracle when it goes to retrieve the text from the BLOB field.  This problem
only happens when TQuery.RequestList is TRUE.

So, I have a userid called CPR and a user called CPR_USER.

CPR has created a table called CPR_COMMENT and has granted access to
CPR_USER to select, delete, update and insert to the table.  Also, a synonym
CPR_USER.CPR_COMMENT has been created to point to the CPR.CPR_COMMENT table.

Using SQL Monitor, if I connect as CPR and select the BLOB from Oracle, BDE
gets the data from the table using the key I give it and then executes a
seperate query to get the BLOB data using the Oracle psuedo-column ROWID to
do so, a very sensible thing to do.  Like this:

SELECT TEXT FROM CPR_COMMENT WHERE ROWID = :1;

Using the same app but connecting to Oracle using the other userid CPR_USER
for some bizarre reason, BDE gets the BLOB using a query like this:

SELECT TEXT FROM CPR_COMMENT WHERE UPDATE_STATUS IS NULL;

UPDATE_STATUS is another row in my table, the last one.  Where BDE is
getting IS NULL from I have no idea.  Of course, the query just returns a
relatively random bit of TEXT from the first record it can find where
UPDATE_STATUS is NULL.  My TQuery just looks like this

SELECT COL1, COL2, COL3, TEXT FROM CPR_COMMENT WHERE COL1 = :1 and COL2 =
:2;

BDE breaks the execution up into the two different queries one getting the
nonBLOB columns and the last getting the BLOB.  Correctly in the first case
and then incorrectly using the other userid.  This problem also goes away if
I set RequestLive = FALSE, in which case it works properly for CPR and
CPR_USER as BDE uses a different set of routines to get the BLOB field.

Has anyone ever had this experience before and do you now of a way I can fix
it without having to redistribute my app? :(

Originally this application ran 'flawlessly' when the code was compiled with
D1 and used the 16bit versions of Oracle and BDE DLLs.  The problem has only
surfaced with my 32bit D2 executable.

Any help would be greatly appreciated,
Thanks in advance for any kind assistance you can share,
Graham Farquharson
Calgary, Canada