Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #21  
Antiguo 20-08-2014
wile777 wile777 is offline
Miembro
NULL
 
Registrado: ago 2014
Posts: 11
Poder: 0
wile777 Va por buen camino
ME FUNCIONA CON ESTE CODIGO PERO SOLO ME ABRE TODA LA BASE DE DATOS:

[procedure TForm1.Button2Click(Sender: TObject);
begin
ProgressBar1.Position := ProgressBar1.Min;
ProgressBar1.Position := ProgressBar1.Max;
If Edit1.Text = '' then // aqui envio un mensaje si esta vacio el Edit1
begin
MessageBox(Handle,
PChar('Tiene que Indicar el numero TELEFONICO o Dato a Colsultar'),
PChar(''),
MB_OK + MB_ICONWARNING + MB_DEFBUTTON1 + MB_APPLMODAL);
end
else // de lo contrario hago lo que sigue
begin
// conectar y obtener datos
ADOTable1.Open
end;]


LE PONGO ESTE QUE ME DIO ecfisa PARA LOGRAR LO QUE QUIERO QUE ME BUSQUE LA RELACION DE LO QUE PONGA EN EL TEDIT1:

[procedure TForm1.btnSearchOneClick(Sender: TObject);
begin
SearchData('TELEFONO', Edit1.Text);
end;

procedure TForm1.ButtonFilterClick(Sender: TObject);
begin
FilterData('DIRECCION', Edit1.Text)
end;

(* Elimina cualquier filtro prefijado *)
procedure TForm1.btnFilterOffClick(Sender: TObject);
begin
ADOTable1.Filtered:= False
end;]


ME DA ESTOS ERRORES:

[Error] Unit1.pas(97): Undeclared identifier: 'btnSearchOneClick'
[Error] Unit1.pas(97): ';' expected but '(' found
[Error] Unit1.pas(99): Undeclared identifier: 'SearchData'
[Error] Unit1.pas(99): Undeclared identifier: 'Edit1'
[Error] Unit1.pas(100): Statement expected, but expression of type 'Text' found
[Error] Unit1.pas(102): Undeclared identifier: 'ButtonFilterClick'
[Error] Unit1.pas(102): ';' expected but '(' found
[Error] Unit1.pas(104): Undeclared identifier: 'FilterData'
[Error] Unit1.pas(104): Undeclared identifier: 'Edit1'
[Error] Unit1.pas(105): Statement expected, but expression of type 'Text' found
[Error] Unit1.pas(108): Undeclared identifier: 'btnFilterOffClick'
[Error] Unit1.pas(108): ';' expected but '(' found
[Error] Unit1.pas(110): Undeclared identifier: 'ADOTable1'
[Error] Unit1.pas(113): '.' expected but ';' found
[Error] Unit1.pas(35): Unsatisfied forward or external declaration: 'TForm1.Button2Click'
[Fatal Error] Project1.dpr(6): Could not compile used unit 'Unit1.pas'
Responder Con Cita
  #22  
Antiguo 20-08-2014
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.077
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Creo que falta un punto y coma en un par de líneas;
Código Delphi [-]
procedure TForm1.ButtonFilterClick(Sender: TObject);
begin
   FilterData('DIRECCION', Edit1.Text);  //   <--------------
end;

(* Elimina cualquier filtro prefijado *)
procedure TForm1.btnFilterOffClick(Sender: TObject);
begin
  ADOTable1.Filtered:= False;  //   <--------------
end;



Por cierto, recuerda poner los tags al código fuente, ejemplo:



Gracias
Responder Con Cita
  #23  
Antiguo 26-08-2014
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Poder: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola wile777.
Cita:
Empezado por wile777 Ver Mensaje
ME DA ESTOS ERRORES:

[Error] Unit1.pas(97): Undeclared identifier: 'btnSearchOneClick'
[Error] Unit1.pas(97): ';' expected but '(' found
[Error] Unit1.pas(99): Undeclared identifier: 'SearchData'
[Error] Unit1.pas(99): Undeclared identifier: 'Edit1'
[Error] Unit1.pas(100): Statement expected, but expression of type 'Text' found
[Error] Unit1.pas(102): Undeclared identifier: 'ButtonFilterClick'
[Error] Unit1.pas(102): ';' expected but '(' found
[Error] Unit1.pas(104): Undeclared identifier: 'FilterData'
[Error] Unit1.pas(104): Undeclared identifier: 'Edit1'
[Error] Unit1.pas(105): Statement expected, but expression of type 'Text' found
[Error] Unit1.pas(108): Undeclared identifier: 'btnFilterOffClick'
[Error] Unit1.pas(108): ';' expected but '(' found
[Error] Unit1.pas(110): Undeclared identifier: 'ADOTable1'
[Error] Unit1.pas(113): '.' expected but ';' found
[Error] Unit1.pas(35): Unsatisfied forward or external declaration: 'TForm1.Button2Click'
[Fatal Error] Project1.dpr(6): Could not compile used unit 'Unit1.pas'
Por órden de aparición, controla que:
  1. En tu form exista un componente TButton y se llame "btnSearchOneClick".
  2. ¿ Copiaste y pegaste la función "SearchData" ?.
  3. En tu form exista un componente TEdit y se llame "Edit1".
  4. En tu form exista un componente TButton y se llame "ButtonFilterClick".
  5. ¿ Copiaste y pegaste la función "FilterData" ?.
  6. En tu form exista un componente TButton y se llame "btnFilterOffClick".
  7. En tu form exista un componente TADOTable y se llame "ADOTable1".
  8. Que el componente "Button2" tenga asociado el método "Button2Click".
  9. Que tu form se llame "Form1".

Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....

Última edición por ecfisa fecha: 26-08-2014 a las 04:10:03.
Responder Con Cita
Respuesta



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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Hacer Que No Me Acepte Letras O Numeros En Un Edit. wascar2003 Varios 13 01-02-2008 00:37:47
como hacer un buscador de palabras crievep Varios 1 01-06-2006 10:44:16
Hacer que me saque 50 números de forma aleatoria james_dean Varios 4 16-05-2005 22:20:15
Identificador de Numeros TELEFONICOS cahosoft API de Windows 3 17-05-2004 13:36:20
Indentificador de Numeros Telefonicos en delphi cahosoft Varios 0 29-04-2004 21:24:20


La franja horaria es GMT +2. Ahora son las 03:07:05.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi