Form Fields and SQL
Last Post 12-07-2011 12:39 PM by Ralph Brenner. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Not Resolved
Ralph BrennerUser is Offline
new to the springs
new to the springs
Posts:3
Avatar

--
12-05-2011 11:33 AM

    Here's what I'm trying to do so forgive me it this has been solved before...but I can't find an example in the forums or samples.


    I have a DF that should take a querystring value of InvoiceID and based on that value do a SQL lookup using that as a Where clause and return a the column InvoiceTotal. I need to use that InvoiceTotal to later send it on to authorize.net for processing.


    Here's what I'm doing:
    1. I have a hidden field called InvoiceID and it is set to get the querystring value. I've tested this and I know I can get a good value to that field.

    2. I have a read only label field called InvoiceTotal with a SQL Option set to

    select InvoiceTotal as DefaultValue from Invoice where InvoiceID = $(InvoiceID)

    When I test the form I get the InvoiceID correctly however, the InvoiceTotal displays nothing. Obviously I'm doing something wrong.

    Can you suggest the best way to accomplish this? I looked & tried the Initial SQL Binding method but didn't get any different results.

    Thanks,

    Ralph

    Ralph BrennerUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    12-05-2011 11:34 AM
    Forgot to mention, I'm using DF 4.0.11
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    12-06-2011 03:20 PM
    Hi Ralph,

    I hope you are well!

    If you are using the options for things such as SQL Defaults I think you must pass the parameter as DSParam1, DSParam2, or DSParam3. This is because we check these parameters for SQL Injection (and allow them). For standard fields other then these we do not allow them to be used in SQL queries. You might also make sure its an integer and if not use ' marks around your token such as '$(Token)'


    Thanks!

    -Chad
    Ralph BrennerUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    12-07-2011 12:39 PM
    Thanks Chad.

    Yep, you were right. Using the DSParam# worked.

    Hope you are well too.

    Ralph


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi