Re: Help with RichEdit and CLOB Oracle filed




"Jim Fleming" <jfleming@xxxxxxxxxxx> wrote:
>Hi!
>Would anyone have some short code snippet(s) that show how to:
> 1) Pass the contents of a RichEdit (RTF formatted) into a Stored Procedure CLOB field.
> 2) Pass the contents of a CLOB query field into a RichEdit for display purposes.
>Both operations using Delphi 7, Oracle 9i and Oracle Oledb Provider.
>
>We would be grateful for any help, as it would help us get started.
>
>Thanks,
>Jim Fleming
>
>

Hi, Jim, the problems can be workrounded,but not use stored procedure:
1). with ADOQurey.params.parambyname('clob_column') do
begin
datatype := ftMemo;
value := Richedit.lines.text;
end;

2). var
temp: widestring;
begin
ADOQry.SQL.Text := 'select ' +
'* from table1 ' + 'WHERE dbms_lob.instr(content, ''' +
key + ''', 1, 1) > 0';

ADOQry.Open;
while not FQry.Eof do
begin
Temp := FQry.FieldByName('Content').Value;
RichEdit.lines.add(temp);
FQry.Next;
end;
end;


3).But still have a problem,you can't insert the Non-Ansi characters to the clob column, eg Chinese character. I don't
know how to solve it.

4). Hope it can help you!
.



Relevant Pages

  • Re: CLOB and Stored Procedure
    ... > i'm using ORACLE 9i and Delphi 2005. ... > I have a field in a one field table defined as CLOB and i have ... > Stored Procedure: ... > for i in 1..3300 loop ...
    (borland.public.delphi.database.ado)
  • stored procedure with CLOB out parameter wont work with oracle provider
    ... We have the following stored procedure in Oracle 10g database: ... PROCEDURE GET_CLOB ... TCHAR stuff; ... Previously for previous versions of Oracle Provider for OLEDBOracle ...
    (microsoft.public.data.oledb)
  • RE: (Fwd) DBD::Oracle (CLOB and sp)
    ... On 09-Dec-2003 Tim Bunce wrote: ... > Im having troubles here in Brazil about fetching clob in out param from a stored procedure ... >, vreturn out clob) ...
    (perl.dbi.users)
  • CLOB and Stored Procedure
    ... I have a field in a one field table defined as CLOB and i have a dummy stored procedure suppose to insert in this field some Data, a text file of 221 kb, add something and return the whole thing as a CLOB. ... DataType:= ftOraClob; ...
    (borland.public.delphi.database.ado)
  • Re: (Fwd) DBD::Oracle (CLOB and sp)
    ... I really dont know if DBD::Oracle supports a out param ... from stored procedure. ... >> Im having troubles here in Brazil about fetching clob in out param ...
    (perl.dbi.users)