Re: Microsoft Provider for Oracle and NCLOB

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Val Mazur (group51a_at_hotmail.com)
Date: 06/06/04


Date: Sat, 5 Jun 2004 22:24:35 -0400

Hi,

I am not working with Oracle, but just a guess. What is the maximum allowed
size for the CLOB fields? CLOB type in a .NET Managed Provider for Oracle
always works with the data in Unicode format regardless of format in a
database, which means if your 2001 character string converted into Unicode
format it will be 4002 bytes long. If there is a limit of 4000 bytes, then
you probably get error.

-- 
Val Mazur
Microsoft MVP
"michaeld@somewhere.nu" <anonymous@discussions.microsoft.com> wrote in 
message news:9B55AA44-6FFE-4552-AA3E-A6605FBF9661@microsoft.com...
> Hello!
> I have a problem using NCLOBs with prepared statements.
> When I run the code below against a table with an NCLOB, I get the 
> ORA-01461 error from Oracle. (cannot bind LONG...)
> The problem only occurs when the string-length is between 2000 and 4000 
> characters.
> What have I missed?...
>
> OracleParameter p = new OracleParameter("p1", OracleType.NClob);
> p.Value = new string('A', 2001);
> command.Parameters.Add(p);
> command.ExecuteNonQuery();
>
> /Michael
> 


Relevant Pages

  • Re: pass through query from access to oracle - date format
    ... I have a pass through query from access to oracle, ... What is date format in Oracle SQL, if I want to do not only date, but ... Another name for the built-in function SYSDATE is CURRENT_DATE. ...
    (comp.databases.ms-access)
  • Re: Prepare, SQL query with to_date call
    ... SQL query with to_date call ... The Oracle ODBC driver has a problem with date parameters although I'm ... using a date format containing the RR format. ...
    (perl.dbi.users)
  • Re: Date Formats
    ... tables of SQL Server. ... I had problem in exporting these fields into Oracle. ... > I presume that the problem is that Oracle doesn't interpret the datetime values from SQL server ... > a format, hence trying to enforce a format for that datatype is meaningless. ...
    (microsoft.public.sqlserver.programming)
  • RE: Prepare, SQL query with to_date call
    ... SQL query with to_date call ... The Oracle ODBC driver has a problem with date parameters although I'm ... using a date format containing the RR format. ...
    (perl.dbi.users)
  • Re: No one could logon to productio database for a while
    ... Puget Sound Oracle Users Group ... code for script is quite simple, it does a v$sql to find all sql ... The script ask for the hash value of the SQL statement. ... col "SLAVE SQL" format A95 WORD_WRAP ...
    (comp.databases.oracle.server)