Hi Jeff,

-----
ORA-01458: invalid length inside variable character

Cause: An attempt was made to bind or define a variable character string
with a buffer length less than the minimum requirement.

Action: Increase the buffer size or use a different type.
-----

It's could be that the provider may have a bug in the internal OCI code.
Either its related to the size of the CLOB that you are passing in, or
the DataLength field of the OracleParameter, they are overwriting the
buffer length field on occasion (in which case the next call would
fail). 

If you are passing in a string as a parameter, what are you passing for
the length (x or 2x where x = length). .NET strings are Unicode strings.
Compare the length when the call fails or succeeds, a minimum length may
be required by OCI [ie, the same code may not work transparently with
SQL Server and Oracle]. Or contact the provider vendor (file a TAR),
since ODP.NET is a supported product.

Hope this helps,
Bob Beauchemin
http://staff.develop.com/bobb

-----Original Message-----
From: jeff Hughes [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 30, 2002 8:20 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] ORA-01458: invalid length inside variable
character


I am about ready to through this computer off the roof.

Ok,
 what I am tring to do here is do a simple query using the
OracleProvider
for .NET

I built a web service that handles calls to sql server and Oracle.
Evertying seems to be working correctly, the building of parameters,
opening of the connection but when I call ExecuteNonQuery() using the
same
parameters sometimes it works and gives me the results as shown below or
it
fails giving me the results shown below the working result set. In
between
these two I have the xmldocument that is used to call this proc. it is
an
xml document that gets passed in to a remoted object via a web service.
if
I use an oleDb driver it works everytime if I use the oracleclient it is
a
hit and miss. usually a miss.

Does anyone know what causes this type of error?
ORA-01458: invalid length inside variable character

thanks
JJ

here is what the result looks like if the call works

- <DocumentRoot>
- <io_pers>
- <![CDATA[ xxxxxxxxx  ]]>
  </io_pers>
- <o_fin_orga_id>
- <![CDATA[ CORP  ]]>
  </o_fin_orga_id>
- <o_orga_>
- <![CDATA[ 2  ]]>
  </o_orga_>
  </DocumentRoot>

xml doc getting passed in


xml doc parameters

              <cmdType> 4 == CommandType.StoredProcedure
              <paramType> 13 == Number (OracleType)
              <parameterDirection> 3 == InputOutput, 2== Ouput, 1==
input
<DataRoot>
 <DataAccess>
  <Access>
   <conName/>
   <Transaction>false</Transaction>
   <cmdText>web_sql_pkg.find_fin_campus</cmdText>
   <cmdType>4</cmdType>
  </Access>
  <Params>
   <paramName>io_per</paramName>
   <paramType>13</paramType>
   <paramDirection>3</paramDirection>
   <paramValue>
    <Value/>
   </paramValue>
  </Params>
  <Params>
   <paramName>i_sn</paramName>
   <paramType>13</paramType>
   <paramDirection>1</paramDirection>
   <paramValue>
    <Value/>
   </paramValue>
  </Params>
  <Params>
   <paramName>o_fin_</paramName>
   <paramType>22</paramType>
   <paramSize>6</paramSize>
   <paramDirection>2</paramDirection>
  </Params>
  <Params>
   <paramName>o_org</paramName>
   <paramType>13</paramType>
     <paramDirection>2</paramDirection>
  </Params>
 </DataAccess>
</DataRoot>

The descriptio of the proc I am hitting is as follows

io_per = Number    In out
i_sn  = Number(9) in
o_fin_ = Varchar2(6) out
o_org = Number out


this is the error I get when it does not work.


- <DocumentRoot>
  <Message>ORA-01458: invalid length inside variable character
string</Message>
  <StackTrace>at SystemDataOracleClientOracleConnectionCheckError
OciHandle
errorHandle Int32 rc at SystemDataOracleClientOracleCommandExecute
OciHandle statementHandle CommandBehavior behavior Boolean isReader
Boolean
needRowid OciHandle rowidDescriptor ArrayList refCursorParameterOrdinals
at
SystemDataOracleClientOracleCommandExecute OciHandle statementHandle
CommandBehavior behavior Boolean needRowid OciHandle rowidDescriptor at
SystemDataOracleClientOracleCommandExecuteNonQueryInternal Boolean
needRowid OciHandle rowidDescriptor at
SystemDataOracleClientOracleCommandExecuteNonQuery at
ApolloDataManagerHostCSqlDataOraNonQuery OracleConnection Connection
OracleTransaction Transaction CommandType commandType String CommandText
OracleParameter[] SqlParams in
c:\remoted\newdataaccess\apollodatamanagerhost\csqldatacs:line
1811</StackTrace>
  </DocumentRoot>

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to