0
As per my understanding you need two show database values to your UI . in your case those are text boxes .
Now suppose you have a table which have some columns like below.
DB table
Id | Col1 | Col2 | Col3 | Col4 |
1 | 111 | 222 | 333 | 444 |
2 | Aaa | | Ccc | Ddd |
3 | Xxx | Yyy | Zzz | Ooo |
| | | | |
UI text box
txtbox1 111
Txtbox2 222
Txtbox3 333
Txtbox4 444
<<First < prv nxt> last>>
you want to see data in the textboxes on click of those buttons
- OFFSET excludes the first set of records.
- OFFSET can only be used with an ORDER BY clause.
- OFFSET with FETCH NEXT returns a defined window of records.
- OFFSET with FETCH NEXT is great for building pagination support.
FIRST CLICK----- Select * from Table Offset 0 Fetch Next 1 Row
Last click-------- Select * from Table Offset (n-1) Fetch Next 1 Row
in the same way you NEED KNOW maintain the OFFSET Value to get the Specific result
0
Hi,
You may check out this for more info :
http://www.functionx.com/vcsharp2003/databases/Lesson02.htm
Thanks,
Priyan
If you found this useful Please mark this as Answer
0
no akash i really don't understand what you are saying can you please elaborate your answer by giving an example application
0
you dont need any other coloumns. you only should have a coloumn which will be having it the primaryId .
When you fetch the record you should know how many records are avaiable and what is the page size .. I think in your case page size is one.
Check more in SQL About FETCH, OFFSET .. You will get your answer with more clarity!! Hope i may answerd your question .