Форум: "Базы";
Текущий архив: 2002.04.25;
Скачать: [xml.tar.bz2];
ВнизПимогите разобраться с DOA. Найти похожие ветки
← →
Sergey13 (2002-04-04 09:44) [4]Что за версия DOA. У меня в 3.4.2 есть TOracleDirectPathLoader а не TOraLoad. Это то?
Сам не юзал, но вот пример из доки, может поможет
// Perform the Direct Path Load
procedure LoadRecords;
var Loader: TOracleDirectPathLoader;
i, Row: Integer;
begin
// Create a Loader at run time
Loader := TOracleDirectPathLoader.Create(nil);
try
// Set the session and table name
Loader.Session := MainSession;
Loader.TableName := "record_data";
// Get the default columns for the record_data table
Loader.GetDefaultColumns(False);
// Prepare the loader
Loader.Prepare;
// Process all data in batches of <MaxRows> records
Row := 0;
for i := 0 to Records.Count - 1 do
begin
// Copy one record to the array
Loader.Columns[0].SetData(Row, @Records[i].Line, 0);
loader.Columns[1].SetData(Row, @Records[i].Text[1],
Length(Records[i].Text));
Inc(Row);
// The array is filled, or we have preocessed all records:
// load this batch of records
if (Row = Loader.MaxRows) or (i = Records.Count - 1) then
begin
try
Loader.Load(Row);
except
// In case of an error: show where things went wrong
// and abort the load operation
on E:EOracleError do
begin
ShowMessage(E.Message + #13 +
"Row = " + IntToStr(Loader.LastRow) + #13 +
"Col = " + IntToStr(Loader.LastColumn));
Loader.Abort;
raise;
end;
end;
Row := 0;
end;
end;
// Commit the loaded data
Loader.Finish;
finally
Loader.Free;
end;
end;
А на Оракловой таблице никакой тригер не висит?
Страницы: 1 вся ветка
Форум: "Базы";
Текущий архив: 2002.04.25;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.007 c