- This topic has 8 replies, 2 voices, and was last updated 5 years, 7 months ago by
TomYU.
-
AuthorPosts
-
-
May 12, 2020 at 04:13 #54748
TomYU
ParticipantHow can I avoid having to rebind it when the dataset is reopened after binding a dataset?
-
May 12, 2020 at 04:55 #54749
TomYU
ParticipantI bind a clientquery, and then when I reopen the clientquery, I must clear the binding before opening, and then rebind after opening.
How can smartbind better support data reopening? Once bound, Smartbind can adapt to the reopening of the clientquery.
-
May 13, 2020 at 09:59 #54756
kimbomadsen
KeymasterHi,
I have looked at it, and it will be available in next release. No date set yet.
-
May 14, 2020 at 01:06 #54767
TomYU
Participanthi,
This is definitely good news for me.
I have used smartbind in the actual project. If I can see the improvement of the above problem as soon as possible, it is a very grateful event for me.
I have already felt the perfection of smartbind. Smartbind is a technology that must be used in the development projects. I look forward to smartbind being more perfect.
In order to bind the reopened clientquery, I have to write a lot of code because my clientquery is on the datamodule and the binding object is on the form. In the end, it looks like the form and datamodule Still tightly coupled together.
In addition, when the Listview is bound to the clientquery, my users can feel the efficiency is very low on the android platform, Is there a way to improve the efficiency?
best regards
Tom yu.
-
-
May 14, 2020 at 04:09 #54769
TomYU
Participanthi,
“In addition, when the Listview is bound to the clientquery, my users can feel the efficiency is very low on the android platform, Is there a way to improve the efficiency?”
This problem was caused by rebinding.
I created a field for ClientQuery during the design period and bound it once during the run time to solve the problem of slow display.best regards
Tom yu.-
May 14, 2020 at 09:34 #54770
kimbomadsen
KeymasterRebinding should be fairly fast unless you have tens of thousands of bindings. However I think that you are no longer making a request for field definitions from the server, which saves you a roundtrip. The server probably also saves a couple of roundtrips towards the database.
AutoFieldDefsOnOpen is a vital property to set correctly depending on need, for when opening kbmMW datasets. It exists both on the client side and server side data set components.
The default is that each dataset will make two calls. One for the metadata/fielddefs and the other for the actual data.
A faster option is to set to only ask for fielddefs when none exists, or use withdata option, or do as you did, predefine the fields and tell it not to get new metadata, since they all save a roundtrip.-
May 16, 2020 at 07:03 #54775
TomYU
ParticipantI have some questions about smartbind:
1.Smarbind does not work properly on the Android platform, but works normally on Windows. When ClientQuery.AutoFieldDefsOnOpen = mwafoOnce.
I think mwafoOnce has bug on android platform.
An error message : the field does not have a dataset.2.I had to call Refresh twice for Listview to display the contents of the dataset correctly.
qOrderItem is a TkbmMWClientQuery and qOrderItem .AutoFieldDefsOnOpen =mwafoNeverprocedure TForm1.BindOrderItem;
begin
qOrderItem .AutoFieldDefsOnOpen :=mwafoNever;
if NavigatorOrderItem=nil then
begin
FBindOrderItem.Bind(qOrderItem, ‘FGoodsCode’, ListView1, ‘#fgoodscode’);
… NavigatorOrderItem:=FBindOrderItem.Bind(qOrderItem, ‘@’, ListView1, ‘@’, [mwboTwoWay]);
end;
NavigatorOrderItem.Navigator.Refresh;
NavigatorOrderItem.Navigator.Refresh;//+++++++++++++end;
3.In the process of repeatedly opening the dataset when clientquery .AutoFieldDefsOnOpen :=mwafoNever, occasionally an error message is generated: the field does not have a dataset. This is caused when smartbind calls the Update method.
-
May 16, 2020 at 07:11 #54776
TomYU
ParticipantAfter using mwafoNevera or mwafoOncer, I do not need to rebind, but when ClientQuery is opened, Listview and data set are often displayed out of sync, even though I call the Refresh method.
This forced me to change back to the original way.
-
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.
