Ver Mensaje Individual
  #3  
Antiguo 16-02-2009
Avatar de joelphi
joelphi joelphi is offline
Miembro
 
Registrado: feb 2009
Ubicación: Guerrero
Posts: 24
Reputación: 0
joelphi Va por buen camino
Tengo asi..

Por cada consulta creo un Objeto Tdatasource y reuso el declarado como atributo..

Código Delphi [-]
 
Private
 Dataset:TDataset;
..
..
 
function TConexion.Consultar(CodigoSQL: String): TDataSource;
begin
    With Dataset Do
    Begin
         Close;
         SQLs.SelectSQL.Clear;;
         SQLs.SelectSQL.Add(CodigoSQL);
         Prepare;
         Try
              Open;
         Except on E:Exception do
         Begin
              Raise;
              Exit;
         End; 
         End; 
    End;  
    Result:= TDataSource.Create(Nil);
    Result.DataSet:=Dataset;
end;


Alguna Sugerencia ..??
Responder Con Cita