• Post Reply Bookmark Topic Watch Topic
  • New Topic

can I use multiple executeQuery() in one program?  RSS feed

 
Pragnyan Dalei
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can we use multiple createStatement() and result sets in a single program. I am executing the following code and I am not getting why the reords are not getting displayed..




thanks in advance...
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ofcourse you can do multiple queries in one program. This line looks wrong:

There is an extra < in front of the tag that should not be there.
Also, you probably do not want to write out <body> start tags inside the while loop. It will not produce a valid HTML page if you do that.

Other than that, can you explain how the actual output differs exactly from what you expect? If you execute the queries with a database browser tool, do they produce the records that you expect?
 
Pragnyan Dalei
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jesper,

now I getting the required result...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!