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!

Filling a localized combobox through SQL
Last Post 02-12-2009 11:05 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
Dieter VierenUser is Offline
wading in the water
wading in the water
Posts:15
Avatar

--
02-11-2009 11:36 PM

    There have been posts about filling a combobox with SQL using $(CurrentLanguage), but I just wanted to point out it can be very simple using the following SQL (if you don't want to create a table)

    SELECT CASE '$(CurrentLanguage)'
     WHEN 'nl-BE' THEN 'Nederlands1'
     WHEN 'de-DE' THEN 'Deutsch1'
     ELSE 'English2' END as QuestionOption,
     1 as QuestionValue
    UNION ALL
    SELECT CASE '$(CurrentLanguage)'
     WHEN 'nl-BE' THEN 'Nederlands2'
     WHEN 'de-DE' THEN 'Deutsch2'
     ELSE 'English2' END as QuestionOption, 
     2 as QuestionValue

    You can just add as many UNIONS as you like, though the query could get a bit long... . So I guess it's best used for small lists and when you don't want to create an extra table.

    ps: you could also use:

    ... CASE LEFT('$(CurrentLanguage)',2) WHEN 'nl' THEN ...

    pps: sorry if this has been posted before.

    Dieter VierenUser is Offline
    wading in the water
    wading in the water
    Posts:15
    Avatar

    --
    02-12-2009 05:59 AM

    There seems to be a small issue with this method, I don't get any values when looking in the combobox html:

    (Nederlands1)

    (Nederlands2)

    ...

    Maybe it's something small I'm overlooking...

     

    edit: I found it: it had to be "QuestionOptionValue" instead of "QuestionValue" in the query above... sorry :/

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    02-12-2009 11:05 AM
    Hi. Thanks for the follow up!

    -Chad
    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