Вниз
Скачать: 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.45 MB
Время: 0.007 c
1-42773
Rustam
2002-01-31 11:18
2002.02.14
ATTENTION help BMP !!!!!


3-42682
xmapa
2002-01-22 10:51
2002.02.14
Поле-массив в InterBase


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


4-42901
Anderius
2001-11-17 21:12
2002.02.14
Как насильно завершить другую программу?


7-42881
Al Creator
2001-11-07 22:52
2002.02.14
Как получить разрешение экрана?




   Наверх