• 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

Populating input fields back from a search query

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a search screen that can take multiple values as inputs, for which i'm building a query dynamically. These queries get dave in the database as a String. Now when I pull this string out of the DB, I need the fields in the search screen to be populated with the values in the where clause.

Has anyone done anything like this? Right now I am going thru the query string trying to make substrings, but that in highly trivial and tedious as the query is huge. I'm looking for a different way to do this. Any input is welcome.

Thanks in advance.

Swathi
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Swathi Ram:
These queries get dave in the database as a String.



I assume that "dave" means "saved"? (Please proofread your posts carefully before comitting).

Why? Doe something else need them to be in that format? if not, store them ina format more suitable to their use.
 
Swathi Ram
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately, saving the whole query in the DB is the only option that i have. Hence I have to pull the values back only from that.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm guessing this is like a saved custom report and you want to reproduce the screen the user entered when making it.

Can you save the original SQL plus something else? Maybe terminate the sql and add some name=value pairs.
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic