Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

wants to configure next and previous buttons for database entry !

 
akash shrimali
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your question?


(And why are you using the JDBC-ODBC bridge?)
 
akash shrimali
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the image of the database
Untitled.png
[Thumbnail for Untitled.png]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guessed as much. How is that pertinent?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic