Miletus questions

  1. Do each MiletusClientDatasets require one MiletusMSSQLDriver (IndexName property
    somewhat implies that) or can one MiletusMSSQLDriver be shared by multiple MiletusClientDatasets ?
  2. How does one establish master detail relationship between two MiletusClientDatasets ? Is it thru parameterized queries ? Can you give an example source code?

The IndexName property belongs to TMiletusClientDataSet. We fixed this and after the next update you'll be able to use a single DB driver with multiple datasets.

Currently there's no option to do this at component level. You could try to use a JOIN query:


I am a little surprised by your join query suggestion instead of master detail relationship. I think there are legitimate reasons to use master detail relationship. I already know how to join tables but I can not use joins for every master I want to display as master detail.

Currently I use UniGui to develop customer applications and I am investigating converting those applications to TMS web components. Miletus is a viable option to make the transition very quickly providing it supports normal programming paradigms.

Using RemoteDBServer with Miletus would definitely be big plus.

I hope you re-consider implementing the capability to establish a true master detail relationship between two clientdatasets or at least allow two clientdatasets to be active simultaneously thru the same driver.

Currently driver does not support two clientdatasets being active simultaneously. If I can activate more than one clientdataset thru the same driver at the same time then I can use parameterized query on the detail clientdataset query to accomplish master detail relationship.

Best regards.


You have responded as "The IndexName property belongs to TMiletusClientDataSet. We fixed this and after the next update you'll be able to use a single DB driver with multiple datasets."
I have loaded webcore and see no difference. Did this fix not make it into version 1.7.2 ?

The IndexName property is added.
Are you sure you FIRST did a FULL uninstall (via Windows Control Panel) of the previous TMS WEB Core version and after that, installed the latest version?

Uninstalled again and reinstalled. This time I see the index name in the MiletusClientDataset as you indicated. However when I connect 2 clientdatasets with different queries to the same driver and activate both of them, only the firstly activated clientdataset's query get executed. What am I doing wrong?


There were issues related to multiple connections that also affected connection through multiple datasets. We've applied a fix that will be part of the next update.

Do you have a time frame for the next update?

There is no fixed ETA.
We are investigating a couple of other things and when these are resolved, we will release a new version.

I also discovered MiletusClientDataset fields are not accessible by code (using either fieldbyname or fields[]), but you are probably aware of that also.

Will I be able to utilize these components without any issues after next update? I am waiting to convert a project written in unigui to using tmswebcore with Miletus and I am willing to participate in testing before the update is released if you are willing.

We are not aware of such issues. If you take a look at the ToDoList Miletus demo, it uses FieldByName. What are you doing differently from that?
If you still encounter problems after taking a look at the demo, can you provide a small test project or code snippet that can reproduce what you are experiencing?

Here is what I do: I set MiletusClientDataSet active and on the following line issue showmessage(MiletusClientDataSet.FieldByName('SomeField').asString). At the point of showmessage we get nothing. It seems at that point clientdataset has not completed the activation and it returns nothing. If I put a button on the form and place the same showmessage on it's click event then it works.

There are situations where we need to get field content right after open is issued. Dynamically instantiated clientdataset can be opened and fields can be tested and then closed. What is the proper way to accomplish this usage ?

Can I use await / promise somehow and how ?

TMiletusClientDataSet inherits from TClientDataSet (can be found in the WEBLib.CDS unit) so it has an AfterOpen event. Would that be something you can use? Your ShowMessage should execute correctly there.

There's no support for await in TMiletusClientDataSet, it will need investigation to see if it's possible.

Thank you for the information. I have already considered afteropen event and it works. However it is very cumbersome to code afteropen event for the dynamically instantiated clientdataset. The query used for each instance can be different and would produce different result set. If the clientdataset support a wait for active then it would be preferable. Otherwise While not Active loop is much practical.