Public feed #529447

MaTHieU

public text v1 · immutable
Raw Edit
·published 2007-06-01 22:51 UTC
rendered paste body
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;