![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
|
error al filtrar tabla
Hola a todos tengo problemas con el filtrado, Me da error y no se como evitarlo obviemos la parte de la fecha que la pregunte en otro hilo pero no se si hice bien talvez la complique un poco, pero fue la unica forma que se me ocurrio si saben otra me dicen. Gracias saludos. El error es cdo chequeo algun componente y doy click en boton filtrar.
Código:
procedure TFTodos.BFiltrarClick(Sender: TObject);
var
fecha:TDateTimeField;
temp:string;
begin
IBQInformes.Close;
temp:='';
IBQInformes.Sql.Clear;
if Cbvencidos.Checked=true then
begin
fecha.Value:=today;
temp:='Telas.FECHA_PROMETIDA > 20/09/2006';
end;
if Cbfaltantes.Checked=true then
if temp='' then
temp:='Telas.Cantidades_Faltantes > 0'
else
temp:=temp+' and Telas.Cantidades_Faltantes > 0';
If CBcliente.checked=true then
begin
if temp='' then
temp:='Telas.Cliente ='+ECLiente.text
else
temp:=temp+' and Telas.Cliente ='+ECLiente.text;
ECLiente.Clear;
end;
if cbpo.Checked=true then
begin
if temp='' then
temp:='Telas.PO ='+Epo.text
else
temp:=temp+' and Telas.PO ='+Epo.text;
EPO.Clear;
end;
if cbdetalle.Checked =true then
begin
if temp='' then
temp:='Telas.descripcion1 ='+Edit1.text
else
temp:=temp+' and Telas.descripcion1 ='+Edit1.text;
Edit1.Clear;
end;
if temp='' then
IBQInformes.SQL.Add('SELECT * FROM Telas INNER JOIN Descripcion '+
'ON Telas.Descripcion1 = Descripcion.Descripcion')
else
IBQInformes.SQL.Add('SELECT * FROM Telas INNER JOIN Descripcion '+
'ON Telas.Descripcion1 = Descripcion.Descripcion where '+QuotedStr(temp)+')');
IBQInformes.Open;
end;
|
|
#2
|
||||
|
||||
|
Saludos
Quita al final el QuotedStr
Saludos
__________________
Van Troi De León (Not) Guía, Code vB:=Delphi-SQL, ¿Cómo? Viajar en el tiempo no es teóricamente posible, pues si lo fuera, ya estarían aqui contándonos al respecto! |
|
#3
|
|||
|
|||
|
bueno gracias ahi pruebo y les cuentos. Pero porque debo quitar el quotedstr
|
|
#4
|
|||
|
|||
|
seguian los errores
Funciono asi, probando lo hice andar pero realmente no fue algo que sabia, pero si alguien me lo puede explicar gracias
Cita:
|
![]() |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Error al filtrar una tabla | judit25 | Conexión con bases de datos | 1 | 01-06-2006 16:04:23 |
| Filtrar una tabla paradox | lbidi | Tablas planas | 5 | 22-09-2004 18:24:07 |
| Filtrar Tabla | jovehe | Tablas planas | 6 | 15-09-2004 22:06:32 |
| como filtrar una tabla | andre navarrete | Varios | 5 | 11-08-2004 06:17:19 |
| Filtrar una tabla | Tangela | Conexión con bases de datos | 1 | 29-05-2003 00:56:37 |
|