Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 20-02-2008
Delfino Delfino is offline
Miembro
 
Registrado: jul 2003
Ubicación: Madrid
Posts: 974
Poder: 23
Delfino Va por buen camino
The example below uses the Lookup method to search the sample Paradox table Customer. The search is based on two fields: Company and State. The search is also based on the following two values in these two fields: "Blue Sports" and "OR". For the search to be successful, there must be a record where the Company field contains the value "Blue Sports" AND the field State contains "OR". If either criteria is not met, the search is unsuccessful (such a record does exist in this table, so the search will be successful). The values of the CustNo and Addr1 fields are returned by the execution of the Lookup method. If the search is unsuccessful, the VarType function applied to the returned variant array returns varNull.
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  V: Variant;
  C: Integer;
  A: String;
begin
  V := Table1.Lookup('Company;State',
    VarArrayOf(['Blue Sports', 'OR']),
    'CustNo;Addr1');
if not (VarType(V) in [varNull]) then begin
    C := V[0];
    A := V[1];
    ShowMessage(IntToStr(C) + #10 + A);
end
else
    ShowMessage('Search unsuccessful!');
end;
__________________
¿Microsoft? No, gracias..
Responder Con Cita
 



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
Campo Lookup con ADO David Bazan Conexión con bases de datos 0 14-07-2006 02:40:57
Lookup SQL server Juanito-Kun SQL 5 15-07-2005 16:56:01
Campo Lookup ¥0n1 SQL 1 03-12-2004 23:40:10
Lookup? Mario1980 Varios 1 23-10-2004 09:04:03
Campos lookup rafadrover Conexión con bases de datos 0 18-08-2003 14:48:32


La franja horaria es GMT +2. Ahora son las 13:47:51.


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