Click here to Skip to main content
15,909,897 members
Home / Discussions / Java
   

Java

 
QuestionJava Web Service-RPC+RMI Sample Project Pin
Cyber128-Nov-13 1:50
Cyber128-Nov-13 1:50 
AnswerRe: Java Web Service-RPC+RMI Sample Project Pin
Richard MacCutchan8-Nov-13 1:58
mveRichard MacCutchan8-Nov-13 1:58 
QuestionClient Server Communication in Java Pin
Cyber128-Nov-13 1:15
Cyber128-Nov-13 1:15 
AnswerRe: Java Sample Project RPC & RMI Pin
Richard MacCutchan8-Nov-13 1:25
mveRichard MacCutchan8-Nov-13 1:25 
GeneralMessage Closed Pin
8-Nov-13 1:34
Cyber128-Nov-13 1:34 
GeneralRe: Java Sample Project RPC & RMI Pin
Richard MacCutchan8-Nov-13 1:57
mveRichard MacCutchan8-Nov-13 1:57 
Questionjava code Pin
Member 103617716-Nov-13 6:05
Member 103617716-Nov-13 6:05 
QuestionRe: java code Pin
Richard MacCutchan7-Nov-13 22:20
mveRichard MacCutchan7-Nov-13 22:20 
Questionhow to find 2nd largest array if array values like{10,20,92,81,92,34} Pin
anjim2-Nov-13 20:00
anjim2-Nov-13 20:00 
SuggestionRe: how to find 2nd largest array if array values like{10,20,92,81,92,34} Pin
Richard MacCutchan2-Nov-13 21:33
mveRichard MacCutchan2-Nov-13 21:33 
AnswerRe: how to find 2nd largest array if array values like{10,20,92,81,92,34} Pin
SimpDev3-Nov-13 6:00
SimpDev3-Nov-13 6:00 
GeneralRe: how to find 2nd largest array if array values like{10,20,92,81,92,34} Pin
anjim3-Nov-13 16:54
anjim3-Nov-13 16:54 
QuestionOverride annotation member variable at runtime Pin
Lash2031-Oct-13 3:45
Lash2031-Oct-13 3:45 
AnswerRe: Override annotation member variable at runtime Pin
lrinish2-Nov-13 13:59
lrinish2-Nov-13 13:59 
GeneralRe: Override annotation member variable at runtime Pin
Lash207-Nov-13 8:25
Lash207-Nov-13 8:25 
AnswerRe: Override annotation member variable at runtime Pin
jschell7-Nov-13 9:22
jschell7-Nov-13 9:22 
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 

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.