Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OracleParameter.Size range 32513 to 32767, DbType.String causes ORA-01460

446245Jun 23 2005 — edited Jun 27 2005
Please update the OracleParameter documentation to reflect that using a DbType.String with paramter size in the range 32513 to 32767 (in this case as a ParamterDirection.ReturnValue) causes "ORA-01460 unimplemented or unreasonable conversion requested". Either that, or fix this bug. Thank you.

I am using ODP.NET 9.2.0.4.0 (OraWin9204.exe) with Oracle9i (9.2.0.4.0) running both client and server on Windows 2000, using Visual Studio 2003.

The following code snippet illustrates the problem:

<code>
using (OracleConnection conn = new OracleConnection(CONNECT_STRING))
{
conn.Open();
using (OracleCommand cmd = conn.CreateCommand())
{
cmd.CommandText = "conversion_error";
cmd.CommandType = CommandType.StoredProcedure;

OracleParameter result = new OracleParameter();
result.DbType = DbType.String;
result.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(result);

for (int size = 32500; size < 33000; size++)
{
try
{
result.Size = size;
Console.Out.Write("result.Size={0}", result.Size);
cmd.ExecuteNonQuery();
}
catch
{
Console.Out.Write(" FAILED");
}
finally
{
Console.Out.WriteLine();
Console.Out.Flush();
}
}
}
}
</code>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2005
Added on Jun 23 2005
2 comments
1,780 views