Using TUniQuery w/ MongoDB

Using TUniQuery w/ MongoDB

Hi,

Having taken a look at https://docs.devart.com/unidac/using-mongodb.htm#tuniconnection, I'm still struggling as the amount of information is somewhat limited (particularly the examples).

I have the following code:


procedure TForm1.Button1Click(Sender: TObject);
var
   Doc : TMongoDocument;
   dc,
   i : integer;

begin
  UniQuery1.SQL.Text := '{"listCollections": 1}';
  UniConnection1.Connected := true;
  Uniquery1.execute;
end;

This in theory should output a list of collections in the particular database; but I am not sure how to get the information from the query to a listbox.    Now if I changed the "Uniquery1.execute;" to "Uniquery1.open;", I get a "SQL statement doesn't return rows", which I don't quite understand since the 'list of collections' would be considered as rows, no?

Any clarifications appreciated.

Ed