Ver Mensaje Individual
  #1  
Antiguo 05-10-2008
Avatar de mightydragonlor
[mightydragonlor] mightydragonlor is offline
Miembro Premium
 
Registrado: feb 2007
Ubicación: Medellín-Colombia
Posts: 587
Reputación: 18
mightydragonlor Va por buen camino
Exclamation Problemas con DB + ListView

Hola a todos, espero me puedan ayudar, mi problema es el siguiente:
Estoy intentando cargar datos desde una DB a un TListView a travez de un Query, el problema radica en que tengo muchos registros en la tabla de la DB y el proceso se ralentiza enormemente, les dejo un fragmento del código para que me ayuden a arreglar este problema.
Código Delphi [-]
procedure TMaetro.FormCreate(Sender: TObject);
var
  AItem: TListItem;
begin
If UnitStart.ClienteNQ.Consultar(CronosDB,ClienteQR,'SP_CLIENTE_SELECT') then
begin
  ListView1.Clear;
  ClienteQR.First;
  While not ClienteQR.Eof do
  begin
    AItem := ListView1.Items.Add;
    AItem.Caption := ClienteQR.Fields[0].AsString;
    AItem.SubItems.Add(ClienteQR.Fields[1].AsString);
    AItem.SubItems.Add(ClienteQR.Fields[2].AsString);
    ClienteQR.Next
  end;
end
else
MessageBox(Application.Handle,
             PChar('No es posible consultar a la Base de Datos'),
             PChar('Error de Conexion'),
             MB_OK + MB_ICONSTOP + MB_DEFBUTTON1 + MB_APPLMODAL);
end;
Responder Con Cita