Subject data display in grid
Author Thomas Besand
Hi ng,

would someone please point me in the right direction on how to go about
with the following:
Server is WI-V2.0.0.12710 Firebird 2.0 Release Candidate 3.

I have some tables that I want the user to be able to browse through.
When the user chooses to browse one of these tables I want to present
her with a part of the selected table, so I don't have to fetch all the
rows.
I like the way this is accomplished in FlameRobin's 'Select * From...'
popup. It gets 300 rows and when you scroll down the records and reach
the 100th line it gets the next 50 records.
But I have no idea how to do this; I tried to change the underlying
DataSource of a DBGrid, like here


dmhpq.qryPartOfTable.Close;
giOffset := giOffset + giRecViewCount;
dmhpq.qryPartOfTable.SQL.Text := 'SELECT FIRST '
+ IntToStr(giOffset)
+ ' SKIP 0'
+ ' "' + strTbl
+ '".*, GEN_ID(MYCOUNTER,1) AS "Position" FROM "'+ strTbl +'" ORDER BY ID;';
strTemp := dmhpq.qryPartOfTable.SQL.Text;
dmhpq.qryPartOfTable.Open;
dmhpq.qryResetMyCounter.ExecSQL; //SET GENERATOR MYCOUNTER TO 0;


But then the table display is refreshed and the active record indicator
doesn't move on smoothly.

As you can see in the above snippet, I also tried to generate a counter
column to derive some sort of position information from, but I failed to
put up something reasonable with it.

Thanks a lot for any input on that,

Greets,

Thomas Besand
Besand EDV & Maschinenwartung
Prinzessinnenstr. 16
10969 Berlin
www.besand.de <http://www.besand.de>
--