Ver Mensaje Individual
  #61  
Antiguo 07-09-2012
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 27
Caral Va por buen camino
Hola
Tal vez mysql no acepta max(), trata de usar Last(), asi:
Código Delphi [-]
If combobox1.text = 'Entrada' then  
   begin
   A:= 'E';
   end
   else begin
   A:= 'S';
   end;
  query.Close;

  query.SQL.Text:='SELECT Last(folio) FROM entradas where tipo = '''+ A + '*'' ';
  query.Open;
  folio.text := IntToStr(query.FieldByName('folio').asInteger +1) ;
Saludos
__________________
Siempre Novato
Responder Con Cita