Page 1 of 1

Nclob parameters

Posted: Mon 19 Oct 2009 13:16
by Babnik42
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?

Posted: Tue 20 Oct 2009 08:16
by Plash
Try to set the National property of the parameter to True.