Enviar dados para o DBGRID !!
Boa Noite !!
Preciso de ajuda para enviar os dados direto para o DBGRID, estou capturando os dados de um site aonde tenho acesso logado, ja esta funcionando mas enviando dados para um MEMO.
procedure TfrmBancoSchahin.btnCapturarClick(Sender: TObject);
var
Doc: IHTMLDocument2;
I: Integer;
Element: OleVariant;
Elements: IHTMLElementCollection;
begin
Doc := wbSchahin.Document as IHTMLDocument2;
Elements := Doc.All; for I := 0 to Elements.length - 1 do
Begin
Element := Elements.item(I, varEmpty);
If (UpperCase(Element.tagName) = 'INPUT') and (UpperCase(Element.Type) = 'TEXT') then
begin
if (Element.value <> '') then
begin
Memo1.Lines.Add(Element.name + ': '+ Element.value);
end;
end;
end;
end;
Estou usando Delphi 2009 + Firebird. Obrigado e Abraços.
var
Doc: IHTMLDocument2;
I: Integer;
Element: OleVariant;
Elements: IHTMLElementCollection;
begin
Doc := wbSchahin.Document as IHTMLDocument2;
Elements := Doc.All; for I := 0 to Elements.length - 1 do
Begin
Element := Elements.item(I, varEmpty);
If (UpperCase(Element.tagName) = 'INPUT') and (UpperCase(Element.Type) = 'TEXT') then
begin
if (Element.value <> '') then
begin
Memo1.Lines.Add(Element.name + ': '+ Element.value);
end;
end;
end;
end;
Estou usando Delphi 2009 + Firebird. Obrigado e Abraços.
Osvaldo Domênico
Curtidas 0
Respostas
Eriley Barbosa
03/09/2010
Como seus dados não vem de uma tabela, você vai er de mandar os dados para um listview ou stringgrid.
GOSTEI 0