Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Database Retriving In JSP  RSS feed

 
Shoaib Ashrafi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a database like Access and SQLServer which have a [ Ledger [Table] ] and it have a about 100,000 reocrds or rows and it have not a unique ID.
the problem is, how to retriving a data like yahoo email first time data retrive 25 rows and then GoBack & GoForward please any body how know about this problems or who work professionally so please reply in my email address shoaibashrafi@yahoo.com, that how to retrive a data in pages or fix rows with not have a unique id.
Thanks
Muhammad Shoaib Ashrafi
shoaibashrafi@yahoo.com
 
Paramagurusamy Balasubramanian
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shoaib,
This mechanism is known as paging.i.e Displaying only a limited amount of records in a page and set a link(either numbering or by having previous,next links)to view the rest.You can implement this method by passing SQL query to the database by providing parameters like From No.of records to To No.of records.i.e if you want to display from 1,10 then you could pass 1,10 in your query(This syntax may vary across databases).In oracle we could use the keyword 'TOP'.
The general formula for doing the above task is (n-1)*25+1,n*25 where n is the page number.If you want to display the first page then u have to display 1 to 25.So the value of n(page number) is 1 here.The formula may be included in the SQL query.
This may be executed by providing page number links like 1,2,3 etc.,and pass the corresponding number to the formula when clicking the link.
I hope this will give u an oral idea.
Thanks & Regards,
Paramagurusamy.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!