How to emulate WRITETEXT / Writing to LONG fields

From: Jeff Lambert <>
Date: 2 Dec 2003 13:06:43 -0800
Message-ID: <>

I am working on porting a Delphi / SQL Server application to Oracle 8i.

In one instance of the program we have a RTF Memo field and we save its lines property directly to a TEXT field using WRITETEXT.

What SQL statement could I use under ORACLE that would provide me with the same results?

Thanks... Jeff

//Sample DELPHI code underneath. Need to translate SQL statement for Oracle.

StrStrm := TStringStream.Create('');
Text.SaveToStream(StrStrm); //this is actually the memo.lines

CommandExec('DECLARE _at_ptrval varbinary(16) '+
'SELECT _at_ptrval = TEXTPTR(['+FieldName+'])'+
' FROM '+TableName+
' WHERE '+WhereClause+
' WRITETEXT '+TableName+'.'+FieldName+' _at_ptrval
Received on Tue Dec 02 2003 - 22:06:43 CET

Original text of this message