unit Question1TripleTTyresU;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DB, ADODB, Grids, DBGrids, ExtCtrls, Buttons,
  jpeg;

type
  TfrmSQLQuestion = class(TForm)
    Panel1: TPanel;
    dbgQry: TDBGrid;
    Panel2: TPanel;
    btnB: TButton;
    btnC: TButton;
    btnD: TButton;
    qryADO: TADOQuery;
    DSADO_Qry: TDataSource;
    BitBtn1: TBitBtn;
    btnA: TButton;
    btnE: TButton;
    Image1: TImage;
    procedure btnBClick(Sender: TObject);
    procedure btnCClick(Sender: TObject);
    procedure btnDClick(Sender: TObject);
    procedure btnAClick(Sender: TObject);
    procedure btnEClick(Sender: TObject);


  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmSQLQuestion: TfrmSQLQuestion;

implementation

{$R *.dfm}

procedure TfrmSQLQuestion.btnAClick(Sender: TObject);
begin
// Write a query to determine the number of trucks that is due for inspection, with a suitable
// column name
// a truck is due for inspection if the last inspection date was more than a 100 days ago
// [5]
end;

procedure TfrmSQLQuestion.btnBClick(Sender: TObject);
begin
// List the RegNo, TyrePosition, TyreSize, Make, FleetName, NewRetread, RecPressure and ActPressure
// fields from the trucks and their corresponding tyredetails
// for all the trucks per fleet where a tyre of a truck was overinflated and the applicable tyre
// is a retread
end;

procedure TfrmSQLQuestion.btnCClick(Sender: TObject);
begin
  // Retrieve all the records from the tyrestockdetails table
  // and display the ID, Brand, Model and SizeCode fields as
  // well as the Diameter of the tyre in Inches and in Cm's
  // where 1 inch = 2.54 cm (Note the column/field headings)
  // which is procuced by Michelin, and Goodyear that will fit
  // an 18 inch rim, and have a width of 245mm.
  // The records should be sorted according to the diameter
  // [15 Marks]
end;

procedure TfrmSQLQuestion.btnDClick(Sender: TObject);
begin
 // Write the SQL query that will allow a user to enter a tyre brand in a n inputbox
 // and retrive all the tyre details from the TyreStockDetails of the brand that was entered.
end;

procedure TfrmSQLQuestion.btnEClick(Sender: TObject);
begin
 // Afrox Polokwane has obtained three brand new trucks which should be added
 // to the Trucks table. The inspection date should be set to the current date.
 // The other details of the three new trucks is stored in the  NewTrucks.txt textfile
 // Write the code that will process the textfile where the fields are seperated with commas
 // and add the records to the truck table accordingly
 // Declare all variables to be used as part of the OnClick event of the [] button
 // You may assume that the file will exist   [16]
end;


end.


