With TClientDataSet you can load from a file at design time, can you do this with TfdMemTable? It's a really useful feature.

Comments

  1. If you right-click on the component, you should see something like "load from file" (checked in XE7).

    ReplyDelete
  2. As Uwe Raabe says. Manually, or in previous version, there is a Resource property with a sub property which is a file name and an option to activate. Not sure about the property names, but it is not intuitive... which is why we aded the direct feature.

    ReplyDelete
  3. Uwe Raabe Thanks, found it there, but this was in XE5 (I should have been more specific). Marco Cantù thanks for the pointer. I found the PersistentFileName property under ResourceOptions. Haven't tried it yet, but guess you just set the Active property to True.

    ReplyDelete
  4. Russell Weetch Yes, that's correct.

    ReplyDelete
  5. ok, tried that - I retrieved the data from a database and saved to file. Then in design time I set the filename and tried to set active and got

    "[FireDAC][Comp][DS]-206. Cannot open dataset [TimeLogTbl]. A DataTable or a DataView must be supplied. Hint: if that is TFDMemTable, use CreateDataSet or CloneCursor to open dataset."

    Any ideas? I can't see a CreateDataset on the popup menu

    ReplyDelete
  6. Ok, sorted. Loaded the form in XE7, did what I needed there :-)

    ReplyDelete

Post a Comment