Print Thread
Page 1 of 2 1 2
Oracle Client 10.2 and XMLTYPE
#9240 05/08/07 09:04 PM
Joined: May 2007
Posts: 2
M
S
Member
OP Offline
Member
S
Joined: May 2007
Posts: 2
M
Hello,

I have just upgraded my Oracle Client from version 10.1 to 10.2 and now TXMLType.Create throws an Exception with Oracle error code ORA-21500. I can reproduce this with a test application containing just a form with a TOracleSession and a TOracleLogon component on it:

Code
  
procedure TForm1.btTestClick(Sender: TObject);
var
  xml     : String;
  xmlType : TXMLType;
begin
  if not OracleLogon1.Execute then
    exit;

  xmlType := nil;
  try
    xml := '<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?><test />';
    xmlType := TXMLType.Create(OracleSession1, xml);  // this line throws an EOracleError
  finally
    xmlType.Free;
    OracleSession1.LogOff;
  end;
end;
With Oracle client version 10.1 it works fine.
The error code indicates this is an Oracle bug, can you confirm this is indeed the case?
Are there any known workarounds?

Im am using Delphi 7 with DOA 4.06.2 on Windows 2000. Oracle Server is 10g Release 10.1.0.4.0

Stefan

Re: Oracle Client 10.2 and XMLTYPE
#9241 05/08/07 10:10 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
If it works on 10.1 and fails with OCI-21500 on 10.2, then it does indeed sound like an Oracle Client bug. DOA uses the exact same OCI calls on 10.1 and 10.2.

What is the complete error text?


Marco Kalter
Allround Automations
Re: Oracle Client 10.2 and XMLTYPE
#9242 05/09/07 11:54 AM
Joined: May 2007
Posts: 2
M
S
Member
OP Offline
Member
S
Joined: May 2007
Posts: 2
M
The complete text of the error message is:

[quote]
OCI-21500: Interner Fehlercode, Argumente: [58], [], [], [], [], [], [], []
OCI-21500: Interner Fehlercode, Argumente: [kghfrh:ds], [0x1333BEC], [], [], [], [], [], []
[/quote]Stefan

Re: Oracle Client 10.2 and XMLTYPE
#9243 05/09/07 10:12 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
This could be Oracle bug 5846373.


Marco Kalter
Allround Automations
Re: Oracle Client 10.2 and XMLTYPE
#9244 06/28/08 01:18 AM
Joined: Aug 2005
Posts: 16
Philadelphia, PA
M
Member
Offline
Member
M
Joined: Aug 2005
Posts: 16
Philadelphia, PA
I've encountered the same issue using the XMLType after migrating from 9.2.0.7 to the 10.2.0.3 client.

Re: Oracle Client 10.2 and XMLTYPE
#9245 06/28/08 02:03 AM
Joined: Aug 2005
Posts: 16
Philadelphia, PA
M
Member
Offline
Member
M
Joined: Aug 2005
Posts: 16
Philadelphia, PA
Marco, I checked metalink and found that Oracle has classified bug 5846373 as unreproducable and "not a bug". (The original report said it was intermittent). If this is not an open issue with Oracle will you pursue the matter? -- it hapens consistently when creating an XMLType using DOA (v. 4.0.7), Oracle 10.2.0.3 database and 10.2.0.3 client.

Re: Oracle Client 10.2 and XMLTYPE
Stefan Buchholtz #40008 04/27/11 01:23 PM
Joined: Oct 2005
Posts: 587
Belgium
Member
Offline
Member
Joined: Oct 2005
Posts: 587
Belgium
Is this resolved?

How could we insert or change xml into the DB from Delphi?

Do we have a demo application with xml handling?

Roeland

DOA 4.1.2.0
Delphi 2010
Oracle 10.2.0.4
Oracle Client 11.2.0


Roeland
Re: Oracle Client 10.2 and XMLTYPE
Roeland #45403 12/20/12 02:38 PM
Joined: Aug 2012
Posts: 6
_
Member
Offline
Member
_
Joined: Aug 2012
Posts: 6
Hi Roeland,

I have the same problem creating an XMLType.
Did you found a solution yet?

https://forums.allroundautomations.com/ubb/ubbthreads.php?ubb=showflat&Number=45397

Regards,
Bas

Re: Oracle Client 10.2 and XMLTYPE
_bas_ #47152 05/30/13 02:10 PM
Joined: Oct 2005
Posts: 587
Belgium
Member
Offline
Member
Joined: Oct 2005
Posts: 587
Belgium
After 6 years, can we have some solution to this simple question:
[quote]
How could we insert or change xml into the DB from Delphi?
[/quote]

Now using an Oracle 11.2 client and DOA 4.1.3.1

Last edited by Roeland; 05/30/13 02:48 PM.

Roeland
Re: Oracle Client 10.2 and XMLTYPE
Roeland #47156 05/31/13 08:58 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
The best way to insert or update XMLTYPE values is to use the XMLTYPE.CreateXML(:clob_variable) function. This can be used in an insert or update statement to pass the value to the XMLTYPE column, but instead of passing an XMLTYPE instance from the client you pass a temporary CLOB with the XML text.


Marco Kalter
Allround Automations
Page 1 of 2 1 2

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.5647 MB (Peak: 3.0455 MB) Data Comp: Off Server Time: 2024-05-20 14:59:55 UTC
Valid HTML 5 and Valid CSS