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!

Sql driven combo boxes
Last Post 10-20-2006 09:43 AM by Chad Nash. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Tim BrandtUser is Offline
skipping stones
skipping stones
Posts:10
Avatar

--
10-18-2006 09:34 AM

    I have multiple combo boxes that must update based on the selection in the first box.

     

    The first box works fine. However I can not get the second box to work.

     

    Here is my code for the first box:

    select COUNTY_NAME as QuestionOption from IA_COUNTY

     

    My second box takes the selected county and pulls a list of cities in that county.

     

    Second box code:

    select  NAME as QuestionOption, TOWN_ID as QuestionOptionValue from IA_TOWNS where COUNTY=@county

     

    No matter what I do the second box doesn't populate.

     

    The shortname for my first box is county.

    The shortname for the second box is city.

     

    Hopefully someone can help me with this.

    After I get this box working I have to have city populate two

    drop downs called Street and Intersecting Street.


     

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    10-18-2006 09:56 AM
    Tim,

    HI. The feature or ability to populate dropdownlists via SQL does exist, and the new enhancements to be able to set default values, show questions, hide questions, based on the response from another question also exists... But the ability to use the response from other questions within the SQL Query does not yet exist. You would need to setup a seperate question for each city in your case it sounds like. Our biggest concern with this is SQL Injection and security for SQL injection. A user could enter in things within a textbox and the value would then be parsed/changed and this is a major security concern. For example, if the user entered a value within a textbox such as (there are many but..) '' For example:

    In your query:
    select NAME as QuestionOption, TOWN_ID as QuestionOptionValue from IA_TOWNS where COUNTY=@county

    IF a user were to enter in a value for a field:'';DROP TABLE USERS
    select NAME as QuestionOption, TOWN_ID as QuestionOptionValue from IA_TOWNS where COUNTY='';DROP TABLE USERS

    The ; would end the statement and execute the next statement. To some degree you can fix this within the query but we feel that this is a major security risk as we look at this enhancement. One thing we might do is enable it only for dropdownlists and not text fields. Since you as the admin setup the dropdownlist you should be ok. There are also a number of text we can remove from any query such as ;, DROP, DELETE, which will also help with security.

    -Chad
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    10-20-2006 09:43 AM
    Tim, since the most recent release with this added enhancement (ability to populate SQL Options for dropdownlist from response to previous dropdownlist response) fix your issues?
    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