hi all, is there any way to simulate like fill-where-string( not setable in OpenEdge10.0B)? because the dataset dstable:fill() will base on temp-table 's "default" index sort. Thank you. Regards, TanMH
is there any way to simulate like fill-where-string( not setable in OpenEdge10.0B)?
because the dataset dstable:fill() will base on temp-table 's "default" index sort.
You use DataView for the pupose of re-querying the dataset. The other option is to use the DataTable:Select() which returns an array of DataRows. Both of this implementations use a SQL like syntax.
Thank you joseph,
but i'm doing manual data batch control and also manual paging in gridview due to huge dataset in c# is not a good idea. Therefore, I can't use the dataset return to the .Net and redo the sorting at .Net. And i force to do the sorting nicely at prodataset 4GL and return right rows to gridview. is there any idea?
I believe fill-where-string can may solve my problem. but i'm using 10.0B 05. fill-where-string is not setable.
I believe you can just re-assign a new query to the ProgressBindingSource and re-open it.
You are right that batching with sorting requires that you apply sort critieria to the query used to fill data.
You can do this by creating a standard ABL query (myquery) with the sort criteria and then set mydatasource:query = myquery. This is often a better approach in more advanced cases anyways, as you cannot use fill-where-string when the query has more than one table.
Can you show me some sample coding in 4GL? This is my first time using this prodataset.
This snippet from your code (from another posting) is already preparing the query for your data-source.
Just add the sort criteria to pc_query. I.e. "for each
DEFINE DATA-SOURCE srcbank FOR QUERY qBank.
Keep in mind that the sort of the data-source only affects the fill of the temp-table. You need to apply a similar sort whenever you traverse or browse the temp-table for this to make any sense. If your sort criteria is not unique the sort of the temp-table may still be in a different order than the fill order. This can give very confusing results on the client when batching, as the new batch may not be appended at the end. One really need to ensure that sort criteria are unique in order to support batching and sorting (for example by applying the key at the end of the sort).
Message was edited by: Havard Danielsen
thank you very much!!!!