Click here to Skip to main content
15,891,423 members
Home / Discussions / Java
   

Java

 
QuestionRising error in Constructor-based Dependency Injection, Spring Framework Pin
kmb8930-Oct-13 15:44
kmb8930-Oct-13 15:44 
SuggestionRe: Rising error in Constructor-based Dependency Injection, Spring Framework Pin
Richard MacCutchan30-Oct-13 22:05
mveRichard MacCutchan30-Oct-13 22:05 
AnswerRe: Rising error in Constructor-based Dependency Injection, Spring Framework Pin
Bernhard Hiller31-Oct-13 1:31
Bernhard Hiller31-Oct-13 1:31 
QuestionJSpinner value from Database. Pin
chdboy27-Oct-13 2:31
chdboy27-Oct-13 2:31 
AnswerRe: JSpinner value from Database. Pin
jschell30-Oct-13 8:18
jschell30-Oct-13 8:18 
Questionpublic and private RSA keys Pin
Beulah Dalrymple25-Oct-13 11:41
Beulah Dalrymple25-Oct-13 11:41 
AnswerRe: public and private RSA keys Pin
Richard MacCutchan25-Oct-13 22:58
mveRichard MacCutchan25-Oct-13 22:58 
QuestionNavigationa with ResultSet Pin
chdboy24-Oct-13 21:55
chdboy24-Oct-13 21:55 
I'm not able to move forward with the ResultSet with this code on "next Button".

Here is the code

Java
public void nextrecord()
	{
		
		Statement stmt = null;
	    String query = "select * from Employer";
	    try {
	    	
	        stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);	        
	         rs = stmt.executeQuery(query);
	        
	         if(rs.isBeforeFirst());
	         {
	         while(rs.next())
	         {
			
	        firstNameTextField.setText(rs.getString(2));
        	lastNameTextField.setText(rs.getString(3));
        	addressTextField.setText(rs.getString(4));
        	
		
	         }
	         
	}
	         
	    }
	    catch (SQLException e )
        {
            e.printStackTrace();
        }
	    
	    }


The problem is when I click on the next button ,it takes me to the last record and skips all the records ,I wanted to go through all the records one by one ,clicking each record one by one.
There is one record present in the text fields before pressing next button.
AnswerRe: Navigationa with ResultSet Pin
Nagy Vilmos24-Oct-13 22:41
professionalNagy Vilmos24-Oct-13 22:41 
GeneralRe: Navigationa with ResultSet Pin
chdboy26-Oct-13 20:57
chdboy26-Oct-13 20:57 
QuestionPutting a split String in a printout. Pin
chdboy23-Oct-13 19:58
chdboy23-Oct-13 19:58 
AnswerRe: Putting a split String in a printout. Pin
Richard MacCutchan23-Oct-13 21:30
mveRichard MacCutchan23-Oct-13 21:30 
GeneralRe: Putting a split String in a printout. Pin
chdboy23-Oct-13 23:16
chdboy23-Oct-13 23:16 
GeneralRe: Putting a split String in a printout. Pin
Richard MacCutchan23-Oct-13 23:23
mveRichard MacCutchan23-Oct-13 23:23 
GeneralRe: Putting a split String in a printout. Pin
chdboy24-Oct-13 0:53
chdboy24-Oct-13 0:53 
Questionapplets Pin
Member 1035631323-Oct-13 18:28
Member 1035631323-Oct-13 18:28 
AnswerRe: applets Pin
Richard MacCutchan23-Oct-13 21:28
mveRichard MacCutchan23-Oct-13 21:28 
QuestionRe: applets Pin
Member 1035631324-Oct-13 16:30
Member 1035631324-Oct-13 16:30 
AnswerRe: applets Pin
Richard MacCutchan24-Oct-13 21:15
mveRichard MacCutchan24-Oct-13 21:15 
SuggestionRe: applets Pin
Member 1035631324-Oct-13 22:01
Member 1035631324-Oct-13 22:01 
QuestionSomething is wrong with the print command. Pin
chdboy21-Oct-13 3:31
chdboy21-Oct-13 3:31 
AnswerRe: Something is wrong with the print command. Pin
angrybobcat21-Oct-13 23:01
angrybobcat21-Oct-13 23:01 
GeneralRe: Something is wrong with the print command. Pin
chdboy21-Oct-13 23:37
chdboy21-Oct-13 23:37 
SuggestionRe: Something is wrong with the print command. Pin
Richard MacCutchan21-Oct-13 23:50
mveRichard MacCutchan21-Oct-13 23:50 
GeneralRe: Something is wrong with the print command. Pin
chdboy22-Oct-13 23:33
chdboy22-Oct-13 23:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.