• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

storing variables in a database

Explorer ,
Jan 02, 2007 Jan 02, 2007

Copy link to clipboard

Copied

OK night owls, see if anyone has a solution for this mind bender!!

I need to post a form to a Crystal reports csp page. The form variables need to be dynamic and are stored in a database. By that I mean: this is in a database cell: {myTable.myField} = #client.myVar# exactly as you see it. On my cfm page I loop over the result set and the hidden input form field looks like this:
input type="hidden" name="selectionFormula" value = "#myQuery.userSF#" . What I WANT is if you view source on the cfm page I want the form field to look like this:
input type="hidden" name="selectionFormula" value = "{myTable.myField} = 12345" where 12345 represents the evaluated form of #client.myVar# which is what was stored in the database.

My problem is that when the cfm page renders the value for the selectionFormla hidden field is exactly what was in the database (i.e. NOT evaluated) as so: {myTable.myField} = #client.myVar#. This of course blows my crystal report up because it doesn;t know what #client.myVar# is.

Any ideas on an elegant solution to this?

Thanks tons!!!
TOPICS
Database access

Views

334

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 08, 2007 Jan 08, 2007

Copy link to clipboard

Copied

LATEST
A) It looks like your form isn't wrapped in a cfoutput, and B) you might be opening yourself up to SQL injection here, since you are broadcasting your db structure through your hidden form fields.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation