Returning into and ORA-03108

Clayton Arends

Member²
I am having a little trouble retrieving the rowid of a record when I insert it. I read in the forum that the RowID() method of TOracleQuery doesn't always work (depending on the version of Oracle) and that the recommended way to retrieve this data is to use the "RETURNING INTO" clause. I have done this and it works fine on many systems. However, on one system I receive the following Oracle Error:

Code:
ORA-03108: oranet: ORACLE does not support this interface version.

Here is my query:

Code:
insert into evibcmac
(evibcmac_account_type, evibcmac_activity_status,evibcmac_description)
values ( :p1,  :p2,  :p3)
returning rowid into  :pRowId

All variables are declared otString.

The odd part is if I log into SQLPlus on the same system and create a PL/SQL block to perform the same task I do not receive an Oracle error. So am I to assume this is a SQL*Net problem or ... ?

Thanks for any help.

------------------
Clayton Arends
Sr. Software Developer
Evisions, Inc. http://evisions.com

[This message has been edited by Confusu (edited 28 May 2002).]
 
What are the Oracle Client and Server versions that are involved here?

------------------
Marco Kalter
Allround Automations
 
I am deploying with DOA version 3.4.6 for BCB 6.

Using SQLPlus I extracted this information:

Oracle8 Enterprise Edition Release 8.0.5.1.0 - Production
With the Partitioning and Objects options
PL/SQL Release 8.0.5.1.0 - Production

Then, using Oracle Installer on the machine that has the problem I extracted this information:

Required Support Files 7.3.4.0.0
SQL*Net Client 2.3.4.0.0

The database in question is served on Linux. I can connect to the same database using my workstation which is running Net8 (I can't find the version). It handles my requests just fine.

There are multiple client machines that connect to this database using the same SQL*Net version and each of them have the same error.

Thanks

------------------
Clayton Arends
Sr. Software Developer
Evisions, Inc. http://evisions.com

[This message has been edited by Confusu (edited 30 May 2002).]
 
Any news on this issue?

Since my last post I've disable the RETURNING INTO code and forced another field to be unique. This way I can INSERT the record then SELECT it later to get the rowid.

I still would rather retrieve the rowid during the INSERT but I am uncomfortable doing this since our test system seems to have the right configuration to cause this to choke.

Is this one of Oracle's infamous versioning conflicts?

------------------
Clayton Arends
Sr. Software Developer
Evisions, Inc.http://evisions.com
 
The fact that this fails on one PC and works correctly on another, and both PC's use the same SQL*Net configuration and the same database instance, does not provide any real clue. The error messages guide indicates a Net/Server version mismatch, but this does not correspond your problem description seems to rule this out.

------------------
Marco Kalter
Allround Automations
 
Marco,

Sorry but this isn't the case. I said that all PC's that are running the same SQL*Net configuration using the same Oracle version (mentioned above) receive the same error. The computer that doesn't receive the error is my development machine which uses Net8 and Oracle 8.1.

------------------
Clayton Arends
Sr. Software Developer
Evisions, Inc.http://evisions.com
 
I see. In that case it may be that SQL*Net does not support this. The TOracleDataSet uses the TOracleQuery.RowId function on SQL*Net and/or Oracle7, and the "returning rowid into ..." syntax on Net8 and Oracle8.

------------------
Marco Kalter
Allround Automations
 
I see. I was under the assumption that "returning into" was a valid Oracle SQL clause no matter what the version. The reason I thought this was because of the post:

Title: oracle query. rowid
Date: Jan 09 2002
Author: umayr

Apparently I was wrong about this. So, I should check the Oracle version and use TOracleQuery::RowId if the version is < 8 and "returning into" if the version is >= 8.

Please correct me if I'm wrong. Thanks again,

------------------
Clayton Arends
Sr. Software Developer
Evisions, Inc.http://evisions.com
 
I assumed that that the returning into clause could be used on an Oracle8 database through SQL*Net 2. After all, it is just an output variable.

If you want to determine if you can use the "returning into" syntax, verify if OracleSession.UseOCI80 = True. If it is False, you should use the RowId property instead.

------------------
Marco Kalter
Allround Automations
 
Back
Top