Exporting Raw Data
Go Up to Exporting and Importing Raw Data
To export raw data, you will need TIBSQL
, TIBDatabase
, and TIBTransaction
components. Associate the components with each other, select a source database, and set the connections to active.
- Tip: Use the Database Editor to set up the database component. To start the Database Editor, right click the database component with the mouse and select Database Editor from the drop-down menu.
The following code snippet outputs selected data with a SQLSELECT
statement from the SOURCE
table to the file source_raw
.
procedure TForm1.Button1Click(Sender: TObject); var RawOutput : TIBOutputRawFile; begin IBSQL1.SQL.Text := 'Select name, number, hired from Source'; RawOutput := TIBOutputRawFile.Create; try RawOutput.Filename := 'source_raw'; IBSQL1.BatchOutput(RawOutput); finally RawOutput.Free; end; end;