• Welcome to SQLitening Support Forum.

Display single or multiple records forward or backward by any key

Started by cj, August 13, 2011, 02:08:41 PM

Previous topic - Next topic


What would be the correct sql statement be to browse forward or backward on any key?
Something like this?
SELECT * FROM TABLE$  WHERE Key$ < CurrentKey$  LIMIT Number$
SELECT *   FROM TABLE$  WHERE Key$ > CurrentKey$ LIMIT Number$

Not sure about getting lowest and highest  key

Something like this?
FUNCTION  GetRec(Table$, Key$, Direction$, Number&) AS STRING
   SELECT statement
   FUNCTION  = RecordSet$

Is there a common sub or function to return the recordset in this manner?

Anyone have an example using PBFORMS?
This would really help me get going on converting to sql.

Would it be possible to write a single function that does about everything needed to browse
without having to write sql statements?   Just pass the parameters instead?

Thank you
"No email alerts being received"  Please often check back.

Rolf Brandt

I like to cook with wine - sometimes I even add it to the food.


"No email alerts being received"  Please often check back.

Fred Meier

You also may want to study Example C.  It has an example of using slSelAry which is a very efficient way to go back and forth thru a set of records.


Thank you very much..
I will convert the demos to PBFORMS and post when done.
I really like using an array or tab delimited file to feed into a grid.

"No email alerts being received"  Please often check back.