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!

Populate Radio button from SQL
Last Post 07-17-2012 06:54 AM by Shane Leslie. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Shane LeslieUser is Offline
going with the flow
going with the flow
Posts:34
Avatar

--
07-17-2012 06:11 AM

    Hey Everyone,


    I've been toying around a bit and am trying to figure out how we can populate a radio button from SQL.  I have an update form created.

    In my form, I have 4 different rb groups, and the are are simple Yes/No answers, and the option value is set to 1/0.  In the database, I had the fields set as a bit, with a value of either 1 or 0.

    I have also switched the datatype in the database to be a string as well, and use yes/no instead of 1/0 along with changing the radio button option value to being yes/no.

    When I do the SQL Bind, everything else in the form populate correctly.  The only items that are not selected are the radio button fields.  If I switch it to a text field, everything work correctly.

    For the simplicity to the user, I would prefer to use a radio button.  This will also limit the number of options that they can update the database with (i.e. Only Yes or No...and not allow any text).

    Thanks for your time!

    -Shane

    Shane LeslieUser is Offline
    going with the flow
    going with the flow
    Posts:34
    Avatar

    --
    07-17-2012 06:54 AM
    Looks like I found my own solution...EUREKA!

    Alright, here is what I did...I am storing the Yes/No field as a bit in the database. In the SQL bind, we simply retrieve whatever value is in the database with a simple SELECT statement - for example:

    SELECT , , FROM WHERE = $(DSParam1)

    On the update form, the short name field matched the column name that is being returned fromt the database.

    Here is the Eureka moment...The reason why the radiobutton was not being selected is because 0 gets translated as FALSE...so, where you assign the "Update Option Value" that needs to match what the translation of 0 is...which is FALSE or TRUE.

    Once I updated the Option Value, everything worked just fine.

    Thanks,
    -Shane
    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.