Вниз
Скачать: CL | DM;

Подскажите, очень срочно надо !!   Найти похожие ветки 

← →
Yakudza ©   (2002-01-22 21:39) [0]

Как из Query экспортировать данные в TXT файл с разделителем табуляция, так как это делает Access !!


← →
Фэ ©   (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;


← →
Yakudza ©   (2002-01-22 22:35) [2]

Разберусь, куда денусь :)
Только вопрос что это - TDBISAMDataSet?
Спасибо


← →
Yakudza ©   (2002-01-22 22:43) [3]

>Только вопрос что это - TDBISAMDataSet?
:))Все понял что это.
Еще раз спасибо!


← →
Фэ ©   (2002-01-23 00:12) [4]

Это из моей биб-ки для работы с DBISAM DataBase.
Убираешь DBISAM и получаешь TDataSet, чьей правнучкой и является TQuery.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.007 c
1-42743
PlaZZma
2002-01-31 01:05
2002.02.14
Как в цикле перебрать компоненты


1-42797
DimaIv
2002-01-31 19:57
2002.02.14
Как вывеcти jpg картинку на полный экран (fullscren)


1-42732
KIR
2002-01-29 21:59
2002.02.14
А как теперь обновлять D6


6-42818
Sir Alex
2001-11-23 20:09
2002.02.14
IE & Asynchronous Pluggable Protocols


14-42843
sidstar
2001-12-25 14:00
2002.02.14
RX Lib 2.75 и Delphi 6




   Наверх