Print Thread
DOA and temporary LOB
#6204 03/19/04 02:09 PM
Joined: Mar 2004
Posts: 3
T
Tolyan Offline OP
Member
OP Offline
Member
T
Joined: Mar 2004
Posts: 3
Please advise me.
I have an initialized temporary LOB declared in specification part of oracle package: gdp_edit.pp_temp_ext_comments.
I want to write data to this LOB from delphi by DOA.
I created this code fragment:

ppLob:=TLOBLocator.CreateTemporary((fDataSet as TOracleDataSet).Session, otBLOB, true);
ppDS:=TOracleQuery.Create(nil);
ppDS.Session:=(fDataSet as TOracleDataSet).Session;
ppDS.DeclareVariable('p_id',otInteger);
ppDS.SetVariable('p_id',fDataSet.FieldByName('ID').AsInteger);
ppDS.DeclareVariable('p_ext_notes',otBLOB);
ppDS.SetComplexVariable('p_ext_notes',ppLob);
// ip_clear_and_init_comments initializes temporary LOB in package (gdp_edit.pp_temp_blob).
ppDS.SQL.Text:='begin gdp.gdp_edit.ip_clear_and_init_comments(:p_id); :p_ext_notes:=gdp.gdp_edit.pp_temp_blob; end;';
ppDS.Execute;
ppExtComLines.SaveToStream(ppLob); // Filling temporary LOB

After this a see that ppLob contains (for example) string 'WWWWWWWWW', BUT:
length of pp_temp_blob in package gdp_edit is 0.

May be exists another way to write data to temporary LOB?

I'am waiting for any advices.

Re: DOA and temporary LOB
#6205 03/19/04 09:31 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
What is your Direct Oracle Access version?


Marco Kalter
Allround Automations
Re: DOA and temporary LOB
#6206 03/21/04 03:08 AM
Joined: Mar 2004
Posts: 3
T
Tolyan Offline OP
Member
OP Offline
Member
T
Joined: Mar 2004
Posts: 3
My DOA version is 4.0.3

P.S. You may delete user "Tolyan1" from this forum. It is my clone ( with the same password wink ).
I have create it when have problems with cookies.

Re: DOA and temporary LOB
#6207 03/21/04 02:32 PM
Joined: Nov 2003
Posts: 89
Germany
A
al0 Offline
Member
Offline
Member
A
Joined: Nov 2003
Posts: 89
Germany
[quote]Originally posted by Tolyan:
Please advise me.
I have an initialized temporary LOB declared in specification part of oracle package: ...
ppDS.Execute;
ppExtComLines.SaveToStream(ppLob); // Filling temporary LOB
I'am waiting for any advices.
[/quote]I guess that you have first fill yout temporary BLOB in Delphi and only after this execute TQuery.
So first:
ppExtComLines.SaveToStream(ppLob); // Filling temporary LOB

and only then
ppDS.Execute;

Re: DOA and temporary LOB
#6208 03/23/04 10:08 PM
Joined: Mar 2004
Posts: 3
T
Tolyan Offline OP
Member
OP Offline
Member
T
Joined: Mar 2004
Posts: 3
Thanks a lot! smile
It is working after a few changes.

ppExtComLines.SaveToStream(ppLob);
ppDS.DeclareVariable('p_ext_notes',otBLOB);
ppDS.SetComplexVariable('p_ext_notes',ppLob);
ppDS.SQL.Text:='begin gdp.gdp_edit.ip_clear_and_init_comments(:p_id); gdp.gdp_edit.pp_temp_blob:=:p_ext_notes; end;';
ppDS.Execute;

Re: DOA and temporary LOB
#6209 03/26/04 02:18 AM
Joined: Nov 2003
Posts: 89
Germany
A
al0 Offline
Member
Offline
Member
A
Joined: Nov 2003
Posts: 89
Germany
[quote]Originally posted by Tolyan:
Thanks a lot! smile
[/quote]Welcome!


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.033s Queries: 14 (0.008s) Memory: 2.5181 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-03 21:04:47 UTC
Valid HTML 5 and Valid CSS