![]() |
![]() |
| 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 |
|
#15
|
|||
|
|||
|
Hola,
Usualmente yo lo hago asi. Disculpen la sitnaxis va a pura memoria. Var S : TStringList; begin S:= TStringList.Create; try S.Clear; s.add('select * from albaranes'); s.add('from albaranes'); s.add('where year(fecha)=:year and month(fecha)=:month'); adodataset.CommandText:=S.Text; adodataset.Parameters.ParseSQL(S.text,true); adodataset.Parameters.ParamByName('year').value:=2005; adodataset.parameters.parambyname('month').value:=11; adodataset.Open; try // haga algo finally adodataset.close; end; finally S.Free; end; Si esta usando un adoquery, yo creo que aun agregando el texto al SQL tstring, el no detecta los parametros en runtime a menos que se llame el parsesql. Si no va a usar parametros, es mejroq que use un Format y agregue los valores de fecha como %s. Última edición por Epachsoft fecha: 21-11-2005 a las 17:00:20. |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
|