![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
|
|
#1
|
|||
|
|||
|
Hola:
Necesitas poner tu consulta para que se pueda ver como la armas. Por que no la usas con parámetros y te olvidas de los problemas con el motor de BD que usas? Saludos
__________________
Ernesto R. |
|
#2
|
|||
|
|||
|
codigo de la consulta
esta es la consulta que ejecuto
procedure TForm1.Button3Click(Sender: TObject); begin inicio:=formatdatetime('DD/MM/YYYY',FECHAI.Date); fin:=formatdatetime('DD/MM/YYYY',FECHAf.Date); fecha.Text:=inicio; caliz.Text:=fin; query1.Close; query1.SQL.Clear; // query1.SQL.Text:='select numparte,descripcion,unidad,precio,promedio,existencias,nivel_minimo,nivel_maximo,localizacion,fecha from materiales where FECHA = #'+datetostr(Fechai.date)+'#'; query1.SQL.Text:='select numparte,descripcion,unidad,precio,promedio,existencias,nivel_minimo,nivel_maximo,localizacion,fecha from materiales where FECHA between #'+datetostr(Fechai.date)+'# and #'+datetostr(Fechaf.date)+'#' ; //query1.SQL.Text:='select numparte,descripcion,unidad,precio,promedio,existencias,nivel_minimo,nivel_maximo,localizacion,fecha from materiales where FECHA between #'+datetostr(Fechai.date)+'# and #'+datetostr(Fechaf.date)+'# '; //query1.SQL.Text:='select numparte,descripcion,unidad,precio,promedio,existencias,nivel_minimo,nivel_maximo,localizacion,fecha from materiales where FECHA between '+inicio+' and '+fin+'' ; // query1.SQL.Text:='select numparte,descripcion,unidad,precio,promedio,existencias,nivel_minimo,nivel_maximo,localizacion,fecha from materiales where FECHA between '+#39+FECHAI.Date+#39+' and'+#39+FECHAf.Date+#39' ; showmessage(query1.SQL.Text); query1.Active:=true; end; |
|
#3
|
|||
|
|||
|
Hola:
Como te comenté en la sentencia SQL, puedes poner parámetros:
A ver si asi te funciona, como te comente dejas que Delphi haga la conversión de fecha y te dejas los asteriscos y no sé que tanta cosa mas Un saludo
__________________
Ernesto R. |
|
#4
|
||||
|
||||
|
Hola Carlos, el problema está en la forma que pasas la fecha
Código PHP:
Código PHP:
Un saludo |
![]() |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
|