• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PreparedStatement behavior quirk

 
Clay Hopkins
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone encountered the following behavior?

I've got an application that builds custom web reports from an Advantage database. For testing purposes, I have the option of printing the report to a file or to a Servlet. Both options call the same method to get the rows from the database. This method contains the PreparedStatement in question.

When I run the app and print the report to a file, the PreparedStatement returns x number of rows. However, when I run it through the servlet, the PreparedStatement returns 0 rows.

Any thoughts would be greatly appreciated!

Regards,

CH
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you can prove, that both commands use the same prepared statement, and the parameters are the same, (and you don't just know it, and prove it, but have proved it), then you probably react in a different way:

or something like that.

Did you use the technique of printing to servlet/ to file sucessfully before?
 
Clay Hopkins
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan-

Thanks for your help. Turns out it was a logic problem in what I was trying to do. Oops :roll:

Regards,

CH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic