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

Импорт данных из текстового файла в БД   Найти похожие ветки 

← →
Fenixx   (2003-08-15 14:08) [0]

Подскажите пожалуста как импортировать данные в Бд (Paradox, interbase) из текстового файла. Для экспорта данных использовался следующий код: unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Db, DBTables, Grids, DBGrids;

type
TForm1 = class(TForm)
DataSource1: TDataSource;
MyTable: TTable;
DBGrid1: TDBGrid;
Button1: TButton;
Dlg: TSaveDialog;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure ExportToASCII;

end;

var
Form1: TForm1;

implementation

{$R *.DFM}
procedure TForm1.ExportToASCII;
const
FASCIISeparator:string=";";
var
I: Integer;
Dlg: TSaveDialog;
ASCIIFile: TextFile;
Res, FASCIIFieldNames: Boolean;
FASCIIFileName:string;
begin
with MyTable do
begin
if Active then
if (FieldCount > 0) and (RecordCount > 0) then
begin
Dlg := TSaveDialog.Create(Application);
Dlg.FileName := FASCIIFileName;
Dlg.Filter := "ASCII-Fiels (*.asc)|*.asc";
Dlg.Options := Dlg.Options+[ofPathMustExist,
ofOverwritePrompt, ofHideReadOnly];
Dlg.Title := "


← →
Leran2003   (2003-08-15 16:13) [1]

Gusev@court.uu.ru



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

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



Память: 0.45 MB
Время: 0.008 c
1-92108
still
2003-08-14 19:36
2003.08.28
Стандартное PopupMenu у TCustomEdit


3-92033
zzzrrv
2003-08-04 15:41
2003.08.28
Индекс для DBF-файла


1-92116
dvp1
2003-08-15 14:48
2003.08.28
Как отсортировать данные в двухпольном TStringGrid?


3-92020
Maksim
2003-08-05 10:32
2003.08.28
Сортировка в TDataSet ?????


3-92050
Nikolay M.
2003-08-04 10:48
2003.08.28
MIDAS, ReconcileError и ClientDataSet.Append




   Наверх