FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
ayuda con AdoDataSet su CommandText y una functions
Haber tengo un Forms con un tAdoDataset, un tmemo, un tedit, un tDBgrid, y una base de datos en access. Tengo dos tcombox que lo que necesito es que al cambiar change los combos se actualice la cadena de texto que le paso al tmemo y con ello seria el sql que utiliza el adodataset para filtrar los datos.
Cuando actualizo el tmemo con la cadena lo hace ok pero siempre me pone una ultima linea del try 'error en datos' y solo queria que saliera eso cuando la cadena pasada al adodataset tuviera errores, a lo mejor estoy utilizando mal el try. Recuerden tengo tres combobox con este mismo codigo: procedure TANEXO1.F_INICIOChange(Sender: TObject); begin Edit1.Text :=DateToStr( F_INICIO.DateTime +6 ); Memo1.Lines.Clear; Memo1.lines.add('select * from ANEXO_1' + ' where PAIS=' + QuotedStr(Combobox1.Text) + ' and AREA=' + QuotedStr(AREA.Text) + ' and S_F_INICIO=#' + datetostr(f_inicio.DateTime) + '# and S_F_FIN=#' + edit1.Text + '# order by PAIS, FECHA_VTTO;'); AdoDataSet1.Close; AdoDataSet1.CommandText:=memo1.Text; AdoDataSet1.Active :=True; try Memo1.Lines.Add('error en datos') finally end; end; |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
DataSnap 2009 Modificar CommandText en el cliente | hibero | Providers | 0 | 06-10-2008 16:02:29 |
CommandText: Duda | Paulao | Varios | 4 | 12-08-2008 20:31:21 |
functions | Makiley | Varios | 8 | 07-02-2006 12:17:02 |
Nested Aggregate Functions | bartHo | Firebird e Interbase | 8 | 20-05-2005 01:50:34 |
UDF funciones / Functions firebird | ASAPLTDA | Firebird e Interbase | 3 | 01-04-2005 17:38:26 |
|