How to emulate WRITETEXT / Writing to LONG fields

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Lambert

    How to emulate WRITETEXT / Writing to LONG fields

    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.C reate('');
    Text.SaveToStre am(StrStrm); //this is actually the memo.lines

    CommandExec('DE CLARE @ptrval varbinary(16) '+
    'SELECT @ptrval = TEXTPTR(['+FieldName+'])'+
    ' FROM '+TableName+
    ' WHERE '+WhereClause+
    ' WRITETEXT '+TableName+'.' +FieldName+' @ptrval
    '''+PChar(StrSt rm.DataString)+ '''')
Working...