Ver Mensaje Individual
  #8  
Antiguo 14-05-2003
__cadetill __cadetill is offline
Miembro
 
Registrado: may 2003
Posts: 3.387
Reputación: 25
__cadetill Va por buen camino
Bueno, si quieres utilizar una Query, porque no utilizas un unico componente TQuery para este caso en particular? Asi podras añadir los TFields y hacer lo que te comento judoboy

El tema de Locate (que te sirve tanto para TTables como TQuery ya que este metodo lo tiene TDataSet y estos derivan de el) es para hacer una busqueda en un Dataset

Sacado de la ayuda de Delphi

Cita:
Implements a virtual method for searching a dataset for a specified record and making it the active record.

function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions
): Boolean; virtual;

Description

This function

Checks whether the dataset is unidirectional, and if so, raises an EDatabaseError exception.
Returns False, indicating that a matching record was not found and the active record was not changed.

Descendant classes that are not unidirectional override this method so that it locates the record where the fields identified by the semicolon-separated list of fields in KeyFields have the values specified by the Variant or Variant array KeyValues. Options indicates whether the search is case insensitive and whether partial matches are supported. Locate returns True if a record is found that matches the specified criteria and that record is now active.
Responder Con Cita