Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Tokens in Dynamic SQL completion event
Last Post 02-19-2009 04:41 AM by james catchpole. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
james catchpoleUser is Offline
skipping stones
skipping stones
Posts:5
Avatar

--
02-18-2009 08:31 AM

    Hello,

    When I submit my form,  I need to use a stored procedure on a remote database which accepts named value pairs.  I want to pass the form elements' shortname AND value, but not able to figure out the correct token for the shortname.

    For example:  SaveDemographic Population=123,  ChildPoverty=12, ChildFoster=12, ChildMedicaid=4

    alternately, I could write the stored procedure to accept one big string encased in single qutoes and comma delimited:

    SaveDemographic 'Population=123,  ChildPoverty=12, ChildFoster=12, ChildMedicaid=4'

    The reason I'm needing this is that my destination table is vertical and I don't have a corresponding column to each of my form elements.  My table is a "mapping" table which relates a demographic metric with a value and a location identifier.

    CountyID, DemoID, Metric

    1 1 19281
    1 2 12398
    1 4 12290
    1 5 12890
    1 6 12992
    1 7 12290
    1 8 12291

    Please advise,

    Thanks!

     

    james catchpoleUser is Offline
    skipping stones
    skipping stones
    Posts:5
    Avatar

    --
    02-18-2009 08:47 AM

    I forgot to mention that the easy answer "just write out your shortnames and put the $(shortname) after the equals sign", is not going to work because my destination is a mapping table.  I can't just write an update statement in my stored procedure.  I have to loop through the parameters and update when it finds a match.

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    02-18-2009 05:10 PM
    James,

    Hi. Well there are a few possibilities here so it really depends on which method you use...

    1. Use the feature under advanced field options for each field to 'Pass field via querystring' and this is based on the short field name. So when you redirect to another page it would look like ?firstname=chad&lastname=jones&blah=something etc...

    2. Use the silent HTTP Post completion event, in this case you have full access to what you want to set the variables too. For example the post might be &myfirstname=$(FirstName)&mylastnamesomethingoranother=$(lastname) etc...

    3. use the SQL Event completion event and pass the variables to a stored procedure which handles the logic... For example...
    exec stp_myprocedure '$(FirstName)', '$(LastName)', '$(Region)', $(UserID) etc... Notice that for varchar/nvarchar tokens we use ' before and after the token, just as if it you would treat them in a SQL query.

    -Chad
    james catchpoleUser is Offline
    skipping stones
    skipping stones
    Posts:5
    Avatar

    --
    02-19-2009 04:41 AM

    Thanks for your reply.

    I was shooting for your solution #3.  However, I need to know if there are tokens which represent the shortfieldnames instead of just the value.

    Here's what I'd like to be able to do:

    sp_MyStoredProcedure '$(FormField1_text)=$(FormField1_value)'

    note:  "FormField1"  describes the first element dynamically, my shortfield name isn't named "FormField1", it's something else. I  just want to reference the formfields without using the explicit shortname- using the reference.

    Can you expose these properties?

    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • 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