Problem exporting CLOB field

Problem exporting CLOB field

Postby JasonR » Fri 07 Dec 2007 12:41

Hi.

I am using the VirtualTable and batchMove compents in conjunction with a DOA TOracleDataSet to export data from my oracle database to a file. (See code example)

Code: Select all
//==========================================//
procedure TMainForm.Export_ORA_Table(Table: String);
begin
  Try
    With TABLE_T do Begin
      Close;
      SQL.Clear;
      DeleteVariables;
      SQL.Add('SELECT * FROM ' + SCHEMA_L.Text + '.'  + Table);
      Open;
    End;
    VTABLE_T.Close;
    VTABLE_T.FieldDefs.Clear;
    VTABLE_T.FieldDefs := TABLE_T.FieldDefs;
    EXPORT_B.Execute;
    VTABLE_T.Open;
    VTABLE_T.SaveToXML(Table+ '.XML');
  Except
    On e : Exception do Begin
                          Showmessage('Could not export ' + Table + ' : ' +  e.Message);
                        End;
  End;
end;
//==========================================//


The problem is that we are using oracle CLOB flieds (as apposed to BLOB) to store richedit formatted fields. When the export routine encounters one of these types of fields I get the error : Field is not BLOB

Please advise.

Delphi Version : 7
OS : XP

I'm not sure which version of Virtualtable and batchmove I have, but they came with my IBDAC installation which (from the history) is version 2.10.0.10 02.08.07.

Thanks
Jason
JasonR
 
Posts: 4
Joined: Fri 07 Dec 2007 12:28

Postby JasonR » Fri 07 Dec 2007 13:10

I think I solved my own problem :oops:

I replaced my code
Code: Select all
VTABLE_T.FieldDefs := TABLE_T.FieldDefs;


with :

Code: Select all
VTABLE_T.Assign(TABLE_T);


and that seems to work. I will test have to test it, but that looks like it did the trick :)
JasonR
 
Posts: 4
Joined: Fri 07 Dec 2007 12:28


Return to VirtualDAC