executeUpdate « Development « Java Database Q&A





1. executeUpdate("")) ???    coderanch.com

All I'm trying to insert data to an empty table and so when i execute just one statement(st.executeUpdate("")) i do not get anything entered,so i had to use a second statement with the first one in order to get the data from the first statement entered to the first row. please let me know what is the ideal solutions. here is ...

2. Execute .executequery,executeupdate    coderanch.com

3. executeUpdate() Problem???    coderanch.com

Hi Arun, Its going to depend on how your JDBC driver vendor handles errors in batch updates. It sounds like your driver does not allow the batch updates to continue if there is an error with one of the calls. A driver can throw the BatchUpdateException when an error occurs while processing a batch. If the driver does continue with processing ...

7. executeUpdate() ?    coderanch.com

8. Another executeUpdate() ?    coderanch.com





10. Problem in executing 'executeUpdate()' method in for loop    coderanch.com

Hi all ! I am trying to add a group of records in MS ACCESS database using the following code: // stringArray is an array of String i.e String[] for(int i=0; i

11. about executeUpdate    coderanch.com

14. diff bw execute and executeUpdate()    coderanch.com

15. return type of executeUpdate    coderanch.com

16. execute() vs executeUpdate()    coderanch.com





17. executeUpdate() return    coderanch.com

Hi, Need your help on this one.I am using PreparedStatment to update the database records.Now, I want to throw Application exception on the basis of returned value from executeUpdate(). What should be the condition to throw exception? int intReturn = pstmtUpdate.executeUpdate(); if (intReturn ??? 0) { } else { } ??? in above condition should be >,>= . Please ...

18. executeUpdate() return type problem    coderanch.com

19. prepStat.executeUpdate() in a loop, any problem?    coderanch.com

Hi there guys. I got this inconvenient problem, I'm trying to save lots of Objects that are in an ArrayList to the database. No sucess though. Here's the code: public String cadastrarResponsavel(PessoaJuridica p) throws SQLException { this.ps = CON.prepareStatement("INSERT INTO Responsavel " + "(cdPessoaJuridica, cdPessoaFisica) " + "VALUES (?, ?)"); List responsaveis = p.getResponsavel(); for(Responsavel resp : responsaveis) { this.cadastrarResponsavel(p, resp); ...

20. executeUpdate method is returning zero.    coderanch.com

21. executeUpdate() return Value    coderanch.com

Thanks Jeanne. I'm just checking a code some other developer has done for the DBConncetion I mentioned above. One method would be like this. Here when the connection is created it sets the autocommit to false. This method has few problems as I see. Please asume all the variables are properly defined and initialized. (stmt--> Statement). public boolean insert(String query){ boolean ...

22. executeUpdate    coderanch.com

23. executeUpdate() returned is -1    coderanch.com

24. Need help regarding executeUpdate() for my database    forums.oracle.com

import java.io.*; public class Index { private static String mTitle = ""; public Index() { } public static void main(String[] args)throws IOException { // TODO code application logic here System.out.println("===Start==="); Dbc dbc = new Dbc(); if(dbc.setCon()==0) System.out.println("Database load successful..."); else{ System.out.println("Database load unsuccessful..."); System.exit(1); } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); while(mTitle.length()<1 | mTitle==""){ System.out.print("Enter movie title: "); mTitle = input.readLine(); ...