Piotr.
Unfortunately, PGDBE doesn't support dbPosition().
I could write a DC_DbPosition() that would work but it would be slow on large databases.
I wrote functions like DC_KeyNo(), DC_KeyCount(), DC_KeyPos() back in the Clipper days before they were available for DBFNTX.
If Alaska doesn't eventually support this for PGDBE, I will use the same algorithm.
Currently, DC_DbPosition() returns a 0 if the dbe is PGDBE.
dc_dbposition and db_position
Re: dc_dbposition and db_position
The eXpress train is coming - and it has more cars.
Re: dc_dbposition and db_position
Roger
thanks for your reply. In this case in DCBROWSE a THUMBLOCK option os a good solution for the vertical scrollbar.
Piotr
thanks for your reply. In this case in DCBROWSE a THUMBLOCK option os a good solution for the vertical scrollbar.
Piotr
Re: dc_dbposition and db_position
this is when use pgDBE while you have to wait for last Element of Result Set.rdonnay wrote:Unfortunately, PGDBE doesn't support dbPosition().
I could write a DC_DbPosition() that would work but it would be slow on large databases.
Problem of pgDBE is Alaska still using Postgre v8.x API.rdonnay wrote:I wrote functions like DC_KeyNo(), DC_KeyCount(), DC_KeyPos() back in the Clipper days before they were available for DBFNTX.
If Alaska doesn't eventually support this for PGDBE, I will use the same algorithm.
using Postgre v9.x API, e.g. native with Phil Ide PG Class, you can use Function ROW_NUMBER() in a SELECT Statment.
Code: Select all
cQuery := "SELECT "+cDBSfield+", "+cOrder+", row_number() OVER (ORDER BY "+cDBSfield+") FROM "+ cTable +;
IF( EMPTY( ::_cWhere ), "", " WHERE " + ::_cWhere ) + ;
" ORDER BY "+cDBSfield
using pgDBE i do NOT recommend to use a normal Browse with DbSkipper() yet.rdonnay wrote:Currently, DC_DbPosition() returns a 0 if the dbe is PGDBE.
every SKIP meed to send a Qwery to PostgreSQL Server ... this is very slow on large Table.
as you got a Result Set you can build a Class and move within a Result Set without using a Array to Browse.
here Sample from Phil Ide Mybrowse CLASS ( XbpBrowse() wrapper ) from 2001 ( !!! )
greetings by OHR
Jimmy
Jimmy