Multiple executeUpdates() issue
Hi Friends
i am having a problem for which i need your suggestion.
i have a code as below
conn = ConnectionFactory.getInstance().getConnection();
stmt = conn.createStatement();
stmt.executeUpdate("INSERT INTO Client ( clientPk, provincePk, countryPk, statusPk, branchPk, salutation, weight, heightMeasurementType, weightMeasurementType ) "+"VALUES (55, '1', ', '66', 1, 1 );");
stmt.executeUpdate("INSERT INTO NurseClientMapping ( userPk, clientPk, sortOrder ) VALUES ('30251', '55', '1');");
stmt.executeUpdate("INSERT INTO clientcareplan ( clientCarePlanPk,carePlanPk,clientPk,statusPk,createdByUserPk,lastupdated,sourceTypePk) VALUES ('25,'1',55,'0',30251,DATE_SUB(SYSDATE(),INTERVAL 11 DAY),'1');");
stmt.executeUpdate("INSERT INTO clientsessioninfo (sessionPk,clientCarePlanPk,clientPk,createdByUserPk,sessionName,startTime,endTime,reminderTime,statusPk,syncStatusPk,lastupdated,sourceTypePk) VALUES (100,25,55,30251,'Wake-up','05:00:00','07:00:00','10','0','2',DATE_SUB(SYSDATE(),INTERVAL 11 DAY),'1');");
stmt.executeUpdate("INSERT INTO clientSurveyPrescription (clientSurveyPrescriptionPk,,lastupdated,sourceTypePk) "VALUES (1000,25,55,30251,'0','2',SYSDATE(),'1');");
i am having multiple queries to execute. i am using this approach of executing all the queries one at a time. is this approach correct to be followed.
please let me know is this correct. waiting for positive reply from your side.
Thanks & Regards
Vikram K

