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!

Initial SQL Render/Data Bind Question
Last Post 02-05-2010 06:25 AM by David To. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Richard OkeUser is Offline
new to the springs
new to the springs
Posts:2
Avatar

--
02-03-2010 12:39 PM

    I am trying to retrieve form information using the Initial SQL Render/Data Bind option in Module Configuration. I have a stored procedure which works with known UserId numbers, to retrieve the values for the form, and I have presently called the stored procedure in the Bind option as follows:-

    exec CoreDb.dbo.GetPersonalProfile $(UserID), '$(Username)', '$(Firstname)', '$(Lastname)', $(ProfileId), $(HighFibre), $(MedFibre), $(LowSatFat), $(LowSalt), $(HighSalt), $(GlutenFree), $(MilkFree), $(Artif), $(Kosher), $(FairTrade), $(Organic), $(Halal), $(Vegan), $(Vege)

    The corresponding stored procedure has a parameter setup of:-

    ALTER PROCEDURE [dbo].[GetPersonalProfile]
        -- Add the parameters for the stored procedure here
        @Userid int,
        @Username nvarchar(255),
        @FirstName nvarchar(255),
        @LastName nvarchar(255),
        @Profileid int OUT,
        @HighFibre bit OUT,
        @MedFibre bit OUT,
        @LowSatFat bit OUT,
        @LowSalt bit OUT,
        @HighSalt bit OUT,
        @GlutenFree bit OUT,
        @MilkFree bit OUT,
        @Artif bit OUT,
        @Kosher bit OUT,
        @FairTrade bit OUT,
        @Organic bit OUT,
        @Halal bit OUT,
        @Vegan bit OUT,
        @Vege bit OUT
    AS
      ...

    In my form, I have a hidden field for ProfileId, no fields defined for UserId, and Fields for the rest with short field names as expressed in the Bind option (e.g. $(Username) has a field with a shortname Username, $(HighFibre) has a check box field with short name HighFibre.

    When the form loads with a valid User, which I know has valid form values, as I use a stored procedure which does work on submission of the form, I only get the Username, Firstname, and Lastname filled in the form. That is to say no checkboxes checked when they should be checked.  Running the stored procedure in SQL Management Studio returns bits set for the User correctly.

    Can anyone tell me what I am doing wrong?  Much obliged in advance.

    Richard OkeUser is Offline
    new to the springs
    new to the springs
    Posts:2
    Avatar

    --
    02-04-2010 05:10 PM
    Hi,
    The big assumptions here are:-
    1. The initial statement retrieves the current UserId. The display of Firstname, Lastname prove this, at least for the field display from DDN standard fields, so it must be around.
    2. That the use of $ tokens is used for Bind statements, aswell as completion.
    3. That the statement needs fiull declaration of the field parameters for the stored procedure
    4. That DataSprings create a parameter based stored procedure call on execution of the Initial ... Data bind code, if supplied with the above example
    5 That DataSprings expect return of the same parameters, and match the $ tokens to the short field names in the module.
    6. That the values returned for a checkbox field, which are stored as a bit in SQL will be converted by Datasprings to set the checkbox.checked on or off. I can change the values back from the stored procedure as a charstring 'Yes' or 'No' if required, or anything else if told.
    7. That the Query bind works without passing it a Querystring.

    I have searched the forums and the documentation for anything to do with this feature, and apart from passing DSPARM1 from one form to another, there is nothing that I can find to tell me how to populate a form from the current DNN field values.

    Please, Please, Please someone tell me what I am doing wrong, or tell me I can't do this - whatever.
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    02-05-2010 06:25 AM
    HI, instead of using the stored procedure for SQL binding, please try something like below:

    select * from tablename where userid = '$(UserID)'

    See if this works for you. If you still have problem, please use the "Contact Us" page and send us the URL/tabID and host login access and I can take a quick look at it. -- David
    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