• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PreparedStatement behavior quirk

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic