I'm sure it is the way I'm using it but why doesn't this work?
Value is a Widestring and contains RTF text. When debugging, Value contains the proper value. I'm using an update statement in an OracleQuery component.
procedure TAMSBusinessServer.SetQuoteTermCond(QuoteId: SYSINT;
const Value: WideString);
var
LOB : TLobLocator;
begin
with qryQuoteClob do begin
Close;
DeleteVariables;
SQL.Text := Format( sSQLIdentifier, [ Self.Name + #46 + Name ] ) + CR + sSetQuoteTermCond;
DeclareVariable( F_QUOTE_ID, otInteger );
DeclareVariable( F_QUOTE_TERM_COND, otCLOB );
SetVariable( F_QUOTE_ID, QuoteId );
LOB := TLOBLocator.Create( ssnAMS, otCLOB );
try
SetComplexVariable( F_QUOTE_TERM_COND, LOB );
Execute;
LOB.Seek(0, soFromBeginning );
LOB.Write( PChar( Value ), Length( Value ));
ssnAMS.Commit;
Close;
finally
LOB.Free;
end;
end;
end;
Value is a Widestring and contains RTF text. When debugging, Value contains the proper value. I'm using an update statement in an OracleQuery component.
procedure TAMSBusinessServer.SetQuoteTermCond(QuoteId: SYSINT;
const Value: WideString);
var
LOB : TLobLocator;
begin
with qryQuoteClob do begin
Close;
DeleteVariables;
SQL.Text := Format( sSQLIdentifier, [ Self.Name + #46 + Name ] ) + CR + sSetQuoteTermCond;
DeclareVariable( F_QUOTE_ID, otInteger );
DeclareVariable( F_QUOTE_TERM_COND, otCLOB );
SetVariable( F_QUOTE_ID, QuoteId );
LOB := TLOBLocator.Create( ssnAMS, otCLOB );
try
SetComplexVariable( F_QUOTE_TERM_COND, LOB );
Execute;
LOB.Seek(0, soFromBeginning );
LOB.Write( PChar( Value ), Length( Value ));
ssnAMS.Commit;
Close;
finally
LOB.Free;
end;
end;
end;