Print Thread
INSERT CLOB = ORA-01036: illegal variable name/number
#8690 09/20/06 09:22 PM
Joined: Sep 2006
Posts: 4
-
Member
OP Offline
Member
-
Joined: Sep 2006
Posts: 4
Hi All,

I am trying to INSERT a record into a table that contains two CLOBs.

The TOracleQuery contains :-

BEGIN
INSERT INTO <Table>
(
<Col1>,
...
<Col84>
)
VALUES
(
:V_COL1,
...
:V_COL84
)
RETURNING <Col75>,
<Col76>
INTO :V_COL75,
:V_COL76;
END;

In code I then do this :-

LOB1 := TLOBLocator.Create(<Session>, otCLOB);
LOB2 := TLOBLocator.Create(<Session>, otCLOB);

try

InsertRecord.SetVariable('V_COL1', <Value>);
...
InsertRecord.SetComplexVariable('V_COL75', LOB1);
InsertRecord.SetComplexVariable('V_COL76', LOB2);
...
InsertRecord.SetVariable('V_COL84', <Value>);
InsertRecord.Execute;

LOB1.AsString := 'TEST1';
LOB2.AsString := 'TEST2';

finally

LOB1.Free;
LOB2.Free;

end;

On the "InsertRecord.Execute" I then get the following error :-

ORA-01036: illegal variable name/number

I have triple checked all the variable names & types on the TOracleQuery and they all appear correct.

I've been on this for hours now and feel like banging my head against a wall!!!

Please could someone put me out of my misery? :-)

Regards
David

Re: INSERT CLOB = ORA-01036: illegal variable name/number
#8691 09/21/06 12:26 AM
Joined: Sep 2006
Posts: 4
-
Member
OP Offline
Member
-
Joined: Sep 2006
Posts: 4
Well I found it at last, but that error message is not even remotely helpful.

Basically I had included some columns in the list that shouldn't have been there (long story).

Anyway, I have removed them and now the "InsertRecord.Execute" produces this :-

ORA-03113: end-of-file on communication channel

The CLOB handling killing the server process?

Regards
David

Re: INSERT CLOB = ORA-01036: illegal variable name/number
#8692 09/21/06 07:46 PM
Joined: Aug 1999
Posts: 22,207
Member
Offline
Member
Joined: Aug 1999
Posts: 22,207
I assume you passed an empty_clob() expression for both CLOB columns?

ORA-03113 usually means that the Oracle Server process for the current session has crashed. Can you check if a user trace dump file exist on the database server that corresponds to this ORA-03113 error? Usually you will see an ORA-00600 error here, with some error codes that may help us find the cause of the problem. If it does, can you send it to me?


Marco Kalter
Allround Automations
Re: INSERT CLOB = ORA-01036: illegal variable name/number
#8693 09/21/06 07:52 PM
Joined: Sep 2006
Posts: 4
-
Member
OP Offline
Member
-
Joined: Sep 2006
Posts: 4
Hi Marco,

Yes I passed in EMPTY_CLOB() for both columns.

I will be back in the office tomorrow so I will speak to the DBA's to see what we can find.

Regards
David

Re: INSERT CLOB = ORA-01036: illegal variable name/number
#8694 09/22/06 06:44 PM
Joined: Sep 2006
Posts: 4
-
Member
OP Offline
Member
-
Joined: Sep 2006
Posts: 4
Hi Marco,

First off I should add we are running Oracle 10.1.0.3 on the server.

The DBA has found the dump file and the problem appears to be internal to Oracle...

ksedmp: internal or fatal error
ORA-07445: exception encountered

They are going to send it off to Oracle for analysis so I will post back when I have further news.

In the meantime, is there anything else you suspect it could be?

Regards
David

Re: INSERT CLOB = ORA-01036: illegal variable name/number
#8695 09/22/06 06:53 PM
Joined: Aug 1999
Posts: 22,207
Member
Offline
Member
Joined: Aug 1999
Posts: 22,207
I have no immediate clues. The dump file may contain a clue though, so if you can send it to me, I can check it out.


Marco Kalter
Allround Automations

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.028s Queries: 13 (0.011s) Memory: 2.5191 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-01 17:50:15 UTC
Valid HTML 5 and Valid CSS