Click here to Skip to main content
15,907,497 members
Home / Discussions / Java
   

Java

 
GeneralRe: [THEORETICAL] Layering I/O streams Pin
TorstenH.18-Jan-11 20:40
TorstenH.18-Jan-11 20:40 
QuestionHow to make indentation in less time?? Pin
aesthetic.crazy17-Jan-11 7:03
aesthetic.crazy17-Jan-11 7:03 
AnswerRe: How to make indentation in less time?? Pin
Cedric Moonen17-Jan-11 8:19
Cedric Moonen17-Jan-11 8:19 
AnswerRe: How to make indentation in less time?? Pin
David Skelly17-Jan-11 22:17
David Skelly17-Jan-11 22:17 
AnswerRe: How to make indentation in less time?? Pin
TorstenH.18-Jan-11 1:49
TorstenH.18-Jan-11 1:49 
AnswerRe: How to make indentation in less time?? Pin
Yadav Akash21-Mar-11 2:39
Yadav Akash21-Mar-11 2:39 
QuestionResultSet to Int [modified] Pin
pancakeleh16-Jan-11 15:54
pancakeleh16-Jan-11 15:54 
AnswerRe: ResultSet to Int Pin
pancakeleh16-Jan-11 21:23
pancakeleh16-Jan-11 21:23 
I have made changes to the codes. Right now i dont face any error but however i dont see the value that i have added, being added to the table.
public String add_btn_action() throws SQLException {
        ResultSet rs = null;
        Statement stmt = null;

        Integer id;
        String dbURL = "....";

        String incidentId = (String) getIncidentidtxt().getValue();
        Integer incidentIntId = Integer.parseInt(incidentId);
        String incidentName = (String) getIncidentnametxt().getValue();

        Connection con = DriverManager.getConnection(dbURL);

        try{

             stmt = con.createStatement();

             rs = stmt.executeQuery("Select COUNT(1) from INCIDENTDATA where INCIDENTID = "+incidentIntId+"");

             while(rs.next()){

             id = rs.getInt(1);

          
             if( id == 0){

            getSessionBean1().updateIncident(incidentIntId, incidentName);
            incidentdataDataProvider.refresh();
             }

              else{

        Integer newIncidentID =  incidentIntId + 1;

        getSessionBean1().updateIncident(newIncidentID, incidentName);
        instancedataDataProvider.refresh();
        }
             }

    }
    catch(Exception e){
        e.getMessage();
    }
        
        return null;
    }


Needing help..
GeneralRe: ResultSet to Int Pin
David Skelly16-Jan-11 22:29
David Skelly16-Jan-11 22:29 
GeneralRe: ResultSet to Int Pin
Richard MacCutchan17-Jan-11 0:36
mveRichard MacCutchan17-Jan-11 0:36 
GeneralRe: ResultSet to Int Pin
jschell17-Jan-11 8:27
jschell17-Jan-11 8:27 
GeneralRe: ResultSet to Int Pin
pancakeleh17-Jan-11 14:30
pancakeleh17-Jan-11 14:30 
GeneralRe: ResultSet to Int Pin
Khalil Adam19-Jan-11 1:27
Khalil Adam19-Jan-11 1:27 
Questionwhat is the basic purpose of static class/methode Pin
khurram_shahzad15-Jan-11 3:21
khurram_shahzad15-Jan-11 3:21 
AnswerRe: what is the basic purpose of static class/methode Pin
Nagy Vilmos15-Jan-11 10:44
professionalNagy Vilmos15-Jan-11 10:44 
GeneralRe: what is the basic purpose of static class/methode Pin
khurram_shahzad17-Jan-11 3:49
khurram_shahzad17-Jan-11 3:49 
AnswerRe: what is the basic purpose of static class/methode Pin
Richard MacCutchan15-Jan-11 21:41
mveRichard MacCutchan15-Jan-11 21:41 
AnswerRe: what is the basic purpose of static class/methode Pin
_Erik_17-Jan-11 3:21
_Erik_17-Jan-11 3:21 
GeneralRe: what is the basic purpose of static class/methode Pin
khurram_shahzad17-Jan-11 3:49
khurram_shahzad17-Jan-11 3:49 
AnswerRe: what is the basic purpose of static class/methode Pin
Ramaiah Raj30-Jan-11 20:07
Ramaiah Raj30-Jan-11 20:07 
QuestionHow to compare two classes instances Pin
khurram_shahzad14-Jan-11 15:54
khurram_shahzad14-Jan-11 15:54 
AnswerRe: How to compare two classes instances Pin
Richard MacCutchan15-Jan-11 0:19
mveRichard MacCutchan15-Jan-11 0:19 
GeneralRe: How to compare two classes instances Pin
khurram_shahzad15-Jan-11 3:10
khurram_shahzad15-Jan-11 3:10 
GeneralRe: How to compare two classes instances Pin
Richard MacCutchan15-Jan-11 4:39
mveRichard MacCutchan15-Jan-11 4:39 
GeneralRe: How to compare two classes instances Pin
Cedric Moonen16-Jan-11 21:01
Cedric Moonen16-Jan-11 21:01 

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.