Client dataset filtering and ProDataSets

Posted by ericg on 26-Jan-2009 14:39

Hi there. I was wondering if it is possible to use SQL against a ProDataSet?

All Replies

Posted by Admin on 26-Jan-2009 14:52

No. That won't work. What are you trying to do that an open query can't do?

Posted by ericg on 26-Jan-2009 15:18

Hi Mike. Our .NET client-side developers would like to filter the dataset they receive. Currently I provide separate input value parameters in Get procedures I provide (using ProxyGen). Then I use QUERY-PREPARE against the input and output dataset.

Any suggestions for receiving and using atleast the WHERE portion in SQL and using it.

Posted by Admin on 26-Jan-2009 23:03

Ah! You should have mentioned that it's a .NET client in the first post...

Will DataViews work for you?

http://msdn.microsoft.com/en-us/library/system.data.dataview.aspx

They provide a filtering and sorting mechanism for DataTables.

Posted by ericg on 27-Jan-2009 10:29

I am not sure that is what I was looking for. It would be on the back-end Progress side that I was thinking of using the SQL received from the client-end. I could send the full table to the client and then they filter on that perhaps but that seems inefficient.

The main question I guess is how can the client provide a filter (assuming they know the table fields) to the back-end to use on a ProDataSet and return the dataset?

Posted by Thomas Mercer-Hursh on 27-Jan-2009 11:17

Why is this anything other than simply providing some appropriate parameters which the server code can use in filling the dataset? The client shouldn't know anything about the implementation on the server so it would be quite inappropirate for it to be supplying actual SQL code.

Posted by ericg on 27-Jan-2009 11:28

Yes I agree with you. And that is what I am doing right now, just providing parameters.

Posted by Thomas Mercer-Hursh on 27-Jan-2009 11:37

Good man! Right thing to do. Encapsulation, encapsulation, encapsulation.

Posted by ericg on 03-Mar-2009 18:23

Finito

This thread is closed