Re: Microsoft Provider for Oracle and NCLOB
From: Val Mazur (group51a_at_hotmail.com)
Date: 06/06/04
- Next message: Val Mazur: "Re: Best Practices? How many connections & adapters"
- Previous message: DJONES: "Re: executenonquery(); timeout error"
- In reply to: michaeld_at_somewhere.nu: "Microsoft Provider for Oracle and NCLOB"
- Next in thread: Angel Saenz-Badillos[MS]: "Re: Microsoft Provider for Oracle and NCLOB"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: Val Mazur: "Re: Best Practices? How many connections & adapters"
- Previous message: DJONES: "Re: executenonquery(); timeout error"
- In reply to: michaeld_at_somewhere.nu: "Microsoft Provider for Oracle and NCLOB"
- Next in thread: Angel Saenz-Badillos[MS]: "Re: Microsoft Provider for Oracle and NCLOB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|