Вниз
Скачать: 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
9-91964
Ricks
2003-02-27 15:35
2003.08.28
OpenGL -> Billboards.


14-92171
Rauf
2003-08-10 05:58
2003.08.28
помогите с задачей про корни полинома


14-92262
ilka
2003-08-08 18:10
2003.08.28
zlib


14-92205
Кен
2003-08-09 02:57
2003.08.28
Задачка про кенгуру


9-91963
K.o.Z
2003-02-28 15:41
2003.08.28
Посоветуйте как поступить...




   Наверх