TObjectList from dataset

Home Forums kbmMW TObjectList from dataset

Viewing 1 reply thread
  • Author
    Posts
    • #53909
      mrluigi2017
      Participant

      Hi,

      I would like to build a TObjectList<TSomeObject>  from a dataset. I use the following code but it doesn’t work.

      SomeObjectList := ORM.FromDataSet<TObjectList<TSomeObject>>(qSomeQuery);

      I do not get an exception and when I debug and step in it just jumps to some assembly. Am I using the right syntax here?  Could this problem be caused by the register knownclasses issue? I have added a reference like Fransisco suggested.  When I just use the orm without the dataset it works fine!

       

      Any suggestions…

       

      Thanks in advance!

      Luigi

      • This topic was modified 1 year, 1 month ago by mrluigi2017.
    • #53911
      kimbomadsen
      Keymaster

      Hi,

      Use someobjectlist:=ORM. ListFromDataset<TSomeObject>(qSomeQuery)

      where someobjectlist:TObjectList<TSomeObject>;

      TSomeObject needs to be registered and known.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.