| | |
Multiple Prepared Statements in JSP
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
jsp Syntax (Toggle Plain Text)
.... String query = "insert into table(stringcol, numcol) values(?, ?)"; pstmt = conn.prepareStatement(query); pstmt.setString(1, "A"); pstmt.setInt(2, 10); pstmt.addBatch(); pstmt.setString(1, "B"); pstmt.setInt(2, 2); pstmt.addBatch(); int[] updateCounts = pstmt.executeBatch(); checkUpdateCounts(updateCounts); conn.commit(); ....
•
•
•
•
Hello all, I've been working on a project where I wish to retrieve two sets of information from a MySQL database using two prepared statements. When I try to do this I get a blank screen, but the first query is successfull executed. Any suggestion would be greatly appreciated.
Thanks.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
![]() |
Similar Threads
- inserting multiple selection from checkbox in to one column (JSP)
- Using Prepared Statements in JAVA (Java)
- Retriving multiple values from Database using JSp (JSP)
- Output multiple values (C++)
- How to send values of list box from jsp to an action ?? (JSP)
- JSP ERROR (JSP)
- how to upload multiple files using jsp (JSP)
Other Threads in the JSP Forum
- Previous Thread: How to create web proxy through jsp
- Next Thread: Calling another JSP without transferring control
| Thread Tools | Search this Thread |
Tag cloud for JSP
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






