Форум: "Базы";
Текущий архив: 2002.02.14;
Скачать: [xml.tar.bz2];
ВнизПодскажите, очень срочно надо !! Найти похожие ветки
← →
Фэ (2002-01-22 22:24) [1]Надеюсь, разберешься и транслируешь.
procedure TfmQuGrid.m_DataSetToASCII(const ADataSet: TDBISAMDataSet; const ASCIIFile: TFileName; const Delimiter: Char; const QuoteStrings: Boolean);
var tmpList: TStringList;
i,LastIndex: LongInt;
AsciiRecord: String;
begin
tmpList:= TStringList.Create;
try
with ADataSet do begin
LastIndex:= Fields.Count - 1;
First;
while not EOF do begin
AsciiRecord:= "";
for i := 0 to LastIndex do
if Fields.Fields[i].Tag = 0 then begin
if QuoteStrings and
(Fields.Fields[i].DataType in [ftString,ftMemo,ftFmtMemo,ftFixedChar,ftWideString]) then
AsciiRecord:= AsciiRecord + QuotedStr(Fields.Fields[i].AsString)
else
AsciiRecord:= AsciiRecord + Fields.Fields[i].AsString;
if i < LastIndex then
AsciiRecord:= AsciiRecord + Delimiter;
end;
tmpList.Append(AsciiRecord);
Next;
end
end;
try
tmpList.SaveToFile(ASCIIFile)
except
ShowMessage("Could not save table to specified file: " + ASCIIFile)
end;
finally
tmpList.Free;
end;
end;
Страницы: 1 вся ветка
Форум: "Базы";
Текущий архив: 2002.02.14;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.005 c