aspose file tools*
The moose likes JDBC and the fly likes wants to configure next and previous buttons for database entry ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "wants to configure next and previous buttons for database entry !" Watch "wants to configure next and previous buttons for database entry !" New topic
Author

wants to configure next and previous buttons for database entry !

akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

What is your question?


(And why are you using the JDBC-ODBC bridge?)


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
PLEASE EXECUTE THE CODE ONES !!










sir i have to design a frame which will take student records in the particular fields , now those records will be stored in database MS access using sql query , what exactly happening is there are 9 buttons in the frame

5 buttons - add , cancel , update, delete and edit

4 buttons for -- previous, next , start and last

MY ADD QUERY ON ADD BUTTON which takes the data from the user is working properly i.e it is taking the data in student table

MY DELETE QUERY ON DELETE BUTTON which delete the particular record of the selected ID number is not working

MY NEXT BUTTON AND PREVIOUS BUTTONS ARE NOT WORKING IN WHICH I HAVE TOGGLE BETWEEN THE RECORDS USING SELECT QUERY ARE ALSO NOT WORKING !!!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Ok, we're getting closer to a question. What do you mean by "MY NEXT BUTTON AND PREVIOUS BUTTONS ARE NOT WORKING"?

(NB: I now understand why you are using the JDBC-ODBC bridge).
akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
sir , like if we click on the next button , the button must go to next record on the database and should display the next records by making ID as primary key




!!!



id ==1
!
!!!
!!!



on next click

id [ 2]
!
!
!!



etc
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I think I understand what you are trying to do, but I'm going to have to display my continuing ignorance as to what your question actually is. What is not working? How is it not working? Do you have a stack trace or error message you are working with?
akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
sir my select query for next button ( > ) is not retrieving data from database known as student(). as i want this while clicking on this button it must move to next records !!!


akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
this is the image of the database


[Thumbnail for Untitled.png]

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Your select statement:

selects everything form the table studentrecords. Are there any records in that table? Once you've selected these records you thrown the data away. Is this what you intended to do?

(Your code is quite difficult to follow. Have you considered refactoring in to something more manageable? )
akash shrimali
Ranch Hand

Joined: Jul 28, 2010
Posts: 45
Paul Sturrock wrote:Your select statement:

selects everything form the table studentrecords. Are there any records in that table? Once you've selected these records you thrown the data away. Is this what you intended top do?

(Your code is quite difficult to follow. Have you considered refactoring in to something more manageable? )


sir here ID is the primary key
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I guessed as much. How is that pertinent?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wants to configure next and previous buttons for database entry !