Recent

Author Topic: How to observe the value of `UniQuery1.FieldByName('Name').AsString` during debu  (Read 261 times)

yinhuajian

  • New Member
  • *
  • Posts: 16
UniQuery1 := UniHelper.Qry('select * from Product', connMain);
try
  str := Edit1.Text;
  str := UniQuery1.FieldByName('Name').AsString;
finally
  FreeAndNil(UniQuery1);
end;

When using the code above, I want to be able to directly observe the values of Edit1.Text and UniQuery1.FieldByName('Name').AsString during debugging. However, when I start the watch window via Ctrl + F5, I find that the IDE does not support displaying their values. A friend told me that the method Edit1.RealGetText() can be used in the watch window to observe the value for Edit1, and it indeed works for Edit1. But is there a similar method for UniQuery1.FieldByName('Name').AsString?

nouzi

  • Sr. Member
  • ****
  • Posts: 326
If I understand you right
try write your code in
Code: Pascal  [Select][+][-]
  1. Procedure TForm1.Edit1OnChange(Sender:TObject);
  2. begin
  3. ...
  4.  



My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

 

TinyPortal © 2005-2018