unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Mask, DBCtrls,
DB, TdbLicense, TdbDataSet,
Grids, DBGrids, Buttons;
type
Tfrm_main =
class(TForm)
DBEdit1: TDBEdit;
Image1: TImage;
TdbTable1: TTdbTable;
DataSource1: TDataSource;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBNavigator1: TDBNavigator;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBGrid1: TDBGrid;
DBEdit13: TDBEdit;
BitBtn1: TBitBtn;
DBEdit14: TDBEdit;
DBCheckBox1: TDBCheckBox;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
frm_main: Tfrm_main;
implementation
uses u_qr1;
{$R *.dfm}
procedure Tfrm_main.BitBtn1Click(Sender: TObject);
begin
liste.TdbQuery1.SQL.Clear;
liste.TdbQuery1.SQL.Add('
SELECT * FROM antragsgegner WHERE ID =' + DBEdit1.Text);
showmessage(liste.TdbQuery1.SQL.text);
liste.TdbQuery1.Open;
liste.preview;
end;
procedure Tfrm_main.FormCreate(Sender: TObject);
var verz:
string;
begin
verz := ExtractFilePath(ParamStr(0))+'
db/';
TdbTable1.Active := False;
try
TdbTable1.DatabaseName := verz;
TdbTable1.TableName := '
db.tdbd';
TdbTable1.Active := True;
except
MessageBeep(0);
ShowMessage('
Die Tabelle db.tdbd befindet' + #10#13 +'
sich nicht im angegebenen Verzeichnis!')
end
end;
end.