I have ADOConnection
, a ADODataSet
, DataSource
, ADOQuery
, a DBGrid
and a DBEdit
.
The DBEdit
is with the DataField = numero
property.
A button with the test:
AdoQuery1.close;
AdoQuery1.SQL.Clear;
AdoQuery1.SQL.Add('select * from tabela WHERE numero=2 ');
AdoQuery1.Open;
Caption := AdoQuery1.fieldbyname('notaTeste').asString;
The SQL command worked correctly because caption shows the expected value.
But it seems that DBGrid
and DBEdit
are not bound to ADOQuery
, because after giving the SQL command nothing changes in DBGrid and DBEdit.
What am I doing wrong?
Use delphi-xe4 professional and bank sql-server-2012 .