Page 1 of 1

ODAC 6.00.0.5: Problem with autogenerated update SQL related to lobs

Posted: Tue 10 Apr 2007 19:29
by MarkF
Hi Folks!

I'm having a problem editing queries that contain lob fields. For example, if I try to edit the ODAC_BLOB table (from one of the demo apps) DBMonitor shows the following SQL returning an error:

UPDATE "ODAC_BLOB"
SET
"TITLE" = :"TITLE"
WHERE
"ID" = :"Old_ID"
RETURNING

INTO

(Note the empty line after returning and INTO.)

If I test using the following table:

create table clob_test2 (
id number(38) primary key,
nm varchar2(100),
cl1 clob,
bl1 blob);

I get an update statement that looks like:

UPDATE "CLOB_TEST2"
SET
"NM" = :"NM""BL1"=NULL
WHERE
"ID" = :"Old_ID"
RETURNING
"BL1"
INTO
:"BL1"

(I only changed the NM field.)

Thanks for any help!

-Mark

Posted: Tue 10 Apr 2007 21:26
by jfudickar
In 6.0.0.4 it seems to be similar.

Greetings
Jens

Posted: Wed 11 Apr 2007 09:24
by Challenger
We reproduced and fixed this problem. This fix will be included in the next build of ODAC.

Posted: Fri 13 Apr 2007 23:51
by mikeho
When will the new build be available? I am having the same problem.

Posting changes to table:

HDRBeforePost(DataSet: TDataSet);
begin
HDRLASTUSER.Value := Data.UserID;
HDRLASTUPDATE.Value := Data.CurrentTime;
end;

Resulting update query captured from DBMonitor:
UPDATE ORDERHDR
SET LASTUSER = :LASTUSER,
LASTUPDATE =:LASTUPDATECOMMENT1=NULL, SHIPTONAME = :SHIPTONAME, SHIPTOCONTACT = :SHIPTOCONTACT, SHIPTOADDR1 = :SHIPTOADDR1, SHIPTOCITY = :SHIPTOCITY, SHIPTOSTATE = :SHIPTOSTATE, SHIPTOPOSTALCODE = :SHIPTOPOSTALCODE, SHIPTOCOUNTRYCODE = :SHIPTOCOUNTRYCODE, SHIPTOPHONE = :SHIPTOPHONE, SHIPTOFAX = :SHIPTOFAX, SHIPTOEMAIL = :SHIPTOEMAIL
WHERE
ORDERID = :Old_ORDERID AND SHIPID = :Old_SHIPID
RETURNING
COMMENT1
INTO
:COMMENT1


Notice the LASTUPDATE =:LASTUPDATECOMMENT1=NULL, should be
LASTUPDATE =:LASTUPDATE, COMMENT1=NULL,

Posted: Mon 16 Apr 2007 07:39
by Challenger
We have fixed the bug with missed comma. We plan to release the new ODAC build this week.

Posted: Thu 19 Apr 2007 09:34
by FanderlF
eagerly waiting for this update :D

Posted: Thu 19 Apr 2007 13:26
by jfudickar
Me Too :!: :!: :!: :(