Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables, Grids, DBGrids;
type
TForm1 = class(TForm)
DBGrid1: TDBGrid;
Query1: TQuery;
DataSource1: TDataSource;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.Title:='База';
DataSource1.DataSet:=Query1;
DBGrid1.DataSource:=DataSource1;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Add('Select from kurs_predm.db');
Query1.Open;
Query1.FieldByName('Name').DisplayLabel:='наименование';
Query1.FieldByName('Prepod').DisplayLabel:='Преподаватель';
Query1.FieldByName('WeekDay').DisplayLabel:='День недели';
Query1.FieldByName('DisTime').DisplayLabel:='Время';
end;
end.
lmikle: А кто тегами будет пользоваться?? Или все жаждут попасть в Read-only?
ошибка: Project Project1.exe raised exception class EDBEngineError with message 'Invalid use of keyworld.
Token:from
Line Number:1'. Process stopped. Use Step or Run to continue.
Уже 2 часа не могу понять что за ошибка. грит что from. хотя вроде все в норме...