function tdm.verifiermatricule(matricule:string):integer; begin ds.CommandType := cmdText; ds.CommandText := 'SELECT code_camion FROM camions WHERE (numero_immatriculation=' + QuotedStr(matricule) + ')'; ds.Active:=true; if Length(ds.Fields[0].AsString) > 0 then Result := ds.Fields[0].AsInteger else Result := -1; ds.Active := false; end; procedure tdm.modifiercamions(codeliv,codecam:integer); begin cmd.CommandType := cmdText; cmd.CommandText := 'UPDATE livraison SET code_camion=' + IntToStr(codecam) + ' WHERE code_livraison=' + IntToStr(codeliv); cmd.Execute; end;