Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > SQL
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 31-01-2005
lucianojdg lucianojdg is offline
Miembro
 
Registrado: dic 2003
Posts: 42
Poder: 0
lucianojdg Va por buen camino
Smile RE: Query y Parámetros

Proba con esto:

DateC := EncodeDate(Year,Month,Day);
IBQueryCheck.SQL.Clear;
IBQueryCheck.SQL.Add('Select * from SEASONS');
IBQueryCheck.SQL.Add('where DATEFROM <= ateC and DATETO >= ateC');
IBQueryCheck.ParamByName('DateC').AsDate := DateC;
IBQueryCheck.Open;

Otra forma de hacer los mismo es la sigueinte:

DateC := EncodeDate(Year,Month,Day);
IBQueryCheck.SQL.Clear;
IBQueryCheck.SQL.Add('Select * from SEASONS');
IBQueryCheck.SQL.Add('where ' + Chr(39) + DateToStr(DateC) + Char(39) +
' Between DATEFROM and DATETO');
IBQueryCheck.Open;


Nota: Hay un espacio antes del Between

Saudos


Luciano
Responder Con Cita
 



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


La franja horaria es GMT +2. Ahora son las 01:25:46.


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