Skip to main content

Uniface Development: Database Pagination

  • November 19, 2018
  • 35 replies
  • 1 view

Show first post

35 replies

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

Yes,

So what you meant by C/S was forms based rather than DSP? We seem to run in to this confusion a lot with Compuware staff as well, we run an application which is NOT thick client, and also NOT web based.

Internally we refer to (testing) versions with the ASN having no redirection to a urouter as Thick Client, and the (standard) versions using urouter/userver as Client Server, so I was confused by your reference to "TC" as "C/S". My apologies.

Iain


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

.. correct Iain,

but YOU can choose an architecture where you can work statefull and all-in-one-process.

if you use another one (remote services etc.) you have your cost/benefit reasons to so so.

So efficiency is not a abstract value:
If pagination support is your prime concern, you can use stepped hitlists on your client (built-in feature).

In a stateless, multi-process world, you have to use some kind of persistency to achieve the same goal, don't you?

Uli


Author: ulrich-merkel (ulrichmerkel@web.de)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George


>in C/S you always stay in the same process so keeping info is a snap.



In C/S used efficiently then you cannot run stateful either. Unless one is using the -ex switch to provide one server for each client, the servers are shared, if you try to run stateful in that respect you get one user locked up behind another user.


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

Hi, Uniface 9.6 now supports paging on a number of databases. Please be aware that the "Sample for paging" in the Downloads section of www.uniface.info is for Uniface 9.4 Regards, Theo Neeskens


Author: Theo Neeskens (tneeskens@itblockz.nl)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

Hi Ingo,

looks like even Microsoft got the note, that Pagination still is a topic and easier solved in other DBMS :) Lets hope they implement it well.

Similiar to MS SQL, the other syntax is are as follows:

MySQL
SELECT * from ENTITY [LIMIT {[offset,] row_count | row_count OFFSET offset}]

(dev.mysql.com/doc/refman/5.0/en/select.html)

 

SOLID
SELECT * from ENTITY [LIMIT row_count [OFFSET skipped_rows] | LIMIT skipped_rows,row_count]

(publib.boulder.ibm.com/infocenter/soliddb/v6r3/topic/com.ibm.swg.im.soliddb.sql.doc/doc/select.html)

 

I didnt manage to figure how Informix or DB/2 (/400) are doing pagination. BUT Google surely knows.

 

 


Author: -GHAN- (hansen@ahp-gmbh.de)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

Hi

Found this one about MS-SQL 2012:

 

=======================

http://newtech.about.com/od/databasemanagement/a/Sql-Server-2011-Denali.htm

Ad-Hoc Query Paging:

Paging results in SQL Server has been discussed for years. The Order By option in the SQL SELECT statement has been enhanced in SQL Server 2012. Using a combination of OFFSET and FETCH along with ORDER BY gives you control of paging through a result set. Using this technique can really help performance by bring back only the results you want to show to your users when they are needed. The following TSQL code runs against the Person table in the AdventureWorks sample database (available from Microsoft). In the sample query below, SQL Server would return 10 records beginning with record 11. The OFFSET command provides a starting point for the SELECT statement in terms of paging, and the FETCH command provides how many records to return at a time. SELECT BusinessEntityID, FirstName, LastName
FROM Person.Person
ORDER BY BusinessEntityID
OFFSET 10 ROWS
FETCH NEXT 10 ROWS ONLY;

=======================

If Compuware just*) outreach the two parameter "OFFSET" and "LIMIT" (FETCH NEXT nn ROWS ONLY), it would so easy to implement a application with pagination :-)

*) Simple way as with other feature: "only supported if database support this feature"
    Or on platforms with out this features UnifAce has to think about a "workaround" within the driver

Ingo

 


Author: istiller (i2stiller@gmx.de)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

I've just released some infos about the topic here:

http://www.udev.info/uniface/the-uniface-pagination-guide/

Maybe you'll find some usefull infos on it.


Author: -GHAN- (hansen@ahp-gmbh.de)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

Thank you, Richard.

unfortunatly I did have no other option but this (crap).  I hope this will end some day ...


Author: -GHAN- (hansen@ahp-gmbh.de)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

Hi Günter

Really a good integration work you did, and bad news for the two incompatibilities. I still can't stand the dbms dependant where clause in read triggers, but that still is a good way to get a generic and efficient pagination system.

Cheers,
Richard


Author: richard.gill (richard.gill@agfa.com)

Jan Cees Boogaard

Database Pagination

Author: palgam0@hotmail.com (George Mockford)

For sometime now I've been experimenting with data pagination using the database and perhaps more specifically modification of the Uniface 'where' clause. Some of you have contributed to this so it's not entirely new but with new stored procedure support in 9.5 for MSSQL I thought I'd share with you what I have done already plus a version specific for MSSQL that calls a stored procedure to 'page' through the database.

Arguably the concepts shown here should be a part of or within our drivers but perhaps if there is sufficient support maybe????

Even if you do not like the concept hopefully the code examples will provide some real examples of how this works but you can be the judge. I've included in the zip more details of what this contains and how it works.

Feedback as always is welcome. -George

For Ingo and all other interested in this topic:

The pagination will not be possible for MySQL and SOLID due to the filtering in the ORDER BY setting of the READ statement. Got this confirmed from the support as I did my tests and found nothing.

As this parameter is filtered, there will be no override of statements here.

Therefore I will (once again) raise a Wish to the topic! Adrian, you hear me? This one is directly for you :D

 


Author: -GHAN- (hansen@ahp-gmbh.de)