Nclob parameters

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Babnik42
Posts: 15
Joined: Tue 28 Nov 2006 11:46

Nclob parameters

Post by Babnik42 » Mon 19 Oct 2009 13:16

I'm trying to update an NCLOB parameter longer than 4000 characters. I had this working with CLOBs using the following code :

vClob := TOraLab.Create(Session.OCISvcCtx);
try
vClob.CreateTemporary(ltClob);
vClob.AsString := S;
vClob.WriteLob;
Query.Params.ParamByName('MyParam').AsOraClob := vClob;
Query.Params.ParamByName('MyParam').ParamType := ptInput;
finally
vClob.Free;
end;

I have tried doing the same thing for nclobs by replacing the ltClob parameter with ltNClob. Unfortunately there is no AsOraNClob property on parameters, so I used as OraClob. This does not seem to work, and rubbish is saved out to the database. The database is properly setup for unicode, as is my connection, as I can write out unicode characters tp nclob fields using the direct method, but only up to 4000 characters.

Am I missing something?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 20 Oct 2009 08:16

Try to set the National property of the parameter to True.

Post Reply