0

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.

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by peter_budo
0
....
      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();
      ....
0

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.

Not normal behaviour. If adatapost will not solve it please provide code sample of you using.

-1

I have a question, what if I was trying to work with more than one table?

Votes + Comments
Try to answer the post.
0

I have a question, what if I was trying to work with more than one table?

It makes no difference to us...

Now, are you gone answer previous question about code you using?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.