Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > SQL
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 07-06-2010
Avatar de olbeup
olbeup olbeup is offline
Miembro
 
Registrado: jul 2005
Ubicación: Santiago de la Ribera (España)
Posts: 688
Poder: 21
olbeup Va camino a la fama
Perdón, faltan las comillas del final de la sql:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
begin
  if ADOConnection1.Connected then
    ADOConnection1.Close;

  with ADOQuery1 do
  begin
    SQL.Clear;

    SQL.Add('SELECT');
    SQL.Add('    MAX(FECHA) AS ULTIMAFECHA');
    SQL.Add('  FROM Personas');
    SQL.Add('  WHERE PERSONAS_ID = 1');

    Open;
  end;

  with ADOQuery1.DataSource.DataSet do
    if FieldByName('ULTIMAFECHA').IsNull then
      DateTimePicker1.Date := now
    else
      DateTimePicker1.Date := FieldByName('ULTIMAFECHA').AsDateTime;
end;
Un saludo
Responder Con Cita
  #2  
Antiguo 08-06-2010
yossi yossi is offline
Miembro
 
Registrado: abr 2010
Posts: 59
Poder: 17
yossi Va por buen camino
muchas gracias a ambos me sirvio de mucho su respuesta
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
From Select kverna Firebird e Interbase 4 26-11-2007 14:55:56
Problema conuna consulta select...not in (select ...) VRO Firebird e Interbase 2 11-08-2005 08:56:35
5 select de 5 tablas diferentes en un select solo sakuragi SQL 6 15-06-2005 18:57:06
Select anidado: Select from (select....) Malon SQL 2 14-10-2004 14:01:24
Select anidado ( Select from select ) Malon Firebird e Interbase 1 05-10-2004 04:14:38


La franja horaria es GMT +2. Ahora son las 12:54:32.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi