Создание базы данных "РЭО-ГАИ"
' AND Автомобили. [Код марки авто] =Марки_автомобиля. [Код марки авто] ' +
' AND Автомобили. [Код цвета] =Цвета. [Код цвета] '+
' AND Типы_кузова. [Наименование] ='''+ComboBox4. Text +''''+
' AND Марки_автомобиля. [Наименование] ='''+ComboBox5. Text +''''+
' AND Цвета. [Наименование] ='''+ComboBox6. Text +'''';
adodataset1. Active: =true;
end;
if (not sum1) and (not sum2) and (not sum3) then
begin
adodataset1. Active: =false;
adodataset1mandText: ='SELECT* '+
' FROMАвтомобили';
adodataset1. Active: =true;
end;
if (not sum1) and (not sum2) and (sum3) then
begin
adodataset1. Active: =false;
adodataset1mandText: ='SELECTАвтомобили. * ' +
' FROMАвтомобили, Цвета' +
' WHERE Автомобили. [Код цвета] =Цвета. [Код цвета] '+
' AND Цвета. [Наименование] ='''+ComboBox6. Text +'''';
adodataset1. Active: =true;
end;
if (not sum1) and (sum2) and (not sum3) then
begin
adodataset1. Active: =false;
adodataset1mandText: ='SELECTАвтомобили. * ' +
' FROMАвтомобили, Марки_автомобиля' +
' WHERE Автомобили. [Код марки авто] =Марки_автомобиля. [Код марки авто] ' +
' AND Марки_автомобиля. [Наименование] ='''+ComboBox5. Text +'''';
adodataset1. Active: =true;
end;
if (sum1) and (not sum2) and (not sum3) then
begin
adodataset1. Active: =false;
adodataset1mandText: ='SELECTАвтомобили. * ' +
' FROMАвтомобили, Типы_кузова' +
' WHERE Автомобили. [Код типа кузова] =Типы_кузова. [Код типа кузова] ' +
' AND Типы_кузова. [Наименование] ='''+ComboBox4. Text +'''';
adodataset1. Active: =true;
end;
if (not sum1) and (sum2) and (sum3) then
begin
adodataset1. Active: =false;
adodataset1mandText: ='SELECTАвтомобили. * ' +
' FROMАвтомобили, Марки_автомобиля, Цвета' +
' WHERE Автомобили. [Код марки авто] =Марки_автомобиля. [Код марки авто] ' +
' AND Автомобили. [Код цвета] =Цвета. [Код цвета] '+
' AND Марки_автомобиля. [Наименование] ='''+ComboBox5. Text +''''+
' AND Цвета. [Наименование] ='''+ComboBox6. Text +'''';
adodataset1. Active: =true;
end;
if (sum1) and (not sum2) and (sum3) then
begin
adodataset1. Active: =false;
adodataset1mandText: ='SELECTАвтомобили. * ' +
' FROMАвтомобили, Марки_автомобиля, Цвета, Типы_кузова' +
' WHERE Автомобили. [Код типа кузова] =Типы_кузова. [Код типа кузова] ' +
' AND Автомобили. [Код цвета] =Цвета. [Код цвета] '+
' AND Типы_кузова. [Наименование] ='''+ComboBox4. Text +''''+
' AND Цвета. [Наименование] ='''+ComboBox6. Text +'''';
adodataset1. Active: =true;
end;
if (sum1) and (sum2) and (not sum3) then
begin
adodataset1. Active: =false;
adodataset1mandText: ='SELECTАвтомобили. * ' +
' FROMАвтомобили, Марки_автомобиля, Типы_кузова' +
' WHERE Автомобили. [Код типа кузова] =Типы_кузова. [Код типа кузова] ' +
' AND Автомобили. [Код марки авто] =Марки_автомобиля. [Код марки авто] ' +
' AND Типы_кузова. [Наименование] ='''+ComboBox4. Text +''''+
' AND Марки_автомобиля. [Наименование] ='''+ComboBox5. Text +'''';
adodataset1. Active: =true;
end;
end;
end.
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm6 = class (TForm)
Memo1: TMemo;
SaveDialog1: TSaveDialog;
Button1: TButton;
procedure Button1Click (Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form6: TForm6;
implementation
{$R *. dfm}
procedure TForm6. Button1Click (Sender: TObject);
begin
memo1. Lines. Text: ='';
form6. Hide;
end; end.