DBGRID does not display result

Asked

Viewed 96 times

2

I have a table that has data registered in SQLServer, but in the application they do not appear in the dbgrid.

DATASOURCdo dbgrid -> UDM.DSPecas_ordem_servico

When opening the form:

procedure TFMHome.lbl_BuscosClick(Sender: TObject);
begin
  UDM.ADODSPecas_ordem_servico.Open;
  FMAltOs.showmodal;
end;

1 answer

3


There’s no mistake, unless it’s the connections. Make sure it’s all right:

DataSource ---ligado---> ADODSPecas_ordem_servico
DbGrid   -----ligado---> DataSource 

Being Adodspecas_ordem_servico one Dataset valid (the one you are giving Open). And the Datasource has to be connected to this Dataset.

Also check the Connection Trio:

Conexão>>DataSet>>DataSource (se possuir DataSet+Provider também conferir).
  • nothing, funny that when I do a new insert it works and appears in dbgrid, when closing is no longer there

  • 1

    Which component is using as Grid ?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.