Cita:
Empezado por Casimiro Notevi
¿Y el dataset (la tabla) está activo/abierto?
|
si amigo, así tengo el código donde trabajo el dbnavigator.
Código Delphi
[-]
procedure TForm3.cargaDBGRID;
begin
StrSQL:='';
StrSQL:='SELECT * FROM GEINVZLA_TB_CUENTAS;';
Cn002 := TADOConnection.Create(nil);
adotComponents := TADOQuery.Create(nil);
Conectado2:=Open_DB (Cn002 , 5 , ServerDB, NameDB2, '', PasswordDB, '' );
if Conectado2 then
Begin
Conectado2:= Open_ADO_Qry(Cn002,adotComponents,StrSQL,false);
adotComponents.Open;
adotComponents.Edit;
adotComponents.Insert;
if Conectado2 then
Begin
with adotComponents do begin
while not Eof do
Begin
dsComponents.DataSet:= adotComponents;
with DBGrid1 do begin
TabOrder := 0;
TitleFont.Color := clWindowText;
TitleFont.Height := -14 ;
TitleFont.Name := 'MS Sans Serif';
TitleFont.Style := [fsBold] ;
DataSource := dsComponents ;
end;
DBNavigator1.DataSource:=dsComponents;
DBGrid1.DataSource:=dsComponents;
Next;
End;
First;
End;
End;
End;
End;