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!

Retrieve data with Initial SQL Query
Last Post 01-21-2013 05:40 AM by Ryan Bakerink. 6 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Régis MATHONUser is Offline
skipping stones
skipping stones
Posts:9
Avatar

--
01-17-2013 12:14 AM

    I'm trying to build  table with edit/ delete fonctions as described in demo 14.
    In part Load/edit Form Record, I'm trying with no success to write an  Initial SQL Query to retrieve data in forms with i clicked on edit icon.
    Can you give an example of a right SQL query?
    Thanks, Régis

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-17-2013 09:16 AM
    Hello Regis,

    Dynamic Form needs to have 2 hidden fields.
    1.) DSParam1
    2.) DBUpdate

    DSParam1 is responsible for retrieving the ID passed in when clicking your "Edit" link in the Dynamic View. You will also use this token in your Initial SQL Bind.

    Select ...... from ...... where Column = '$(DSParam1)'

    DBUpdate will have a default value of False. And will retrieve values from the querystring. The purpose of this field is to do 2 things:
    1.) You can use this field to conditionally execute a Form Completion Event.
    2.) You can use this field to conditionally enable Initial SQL Binding.

    With that said, when the Edit Link is clicked for a particular record in your Dynamic View or other reporting module, the URL will point to the page with the Dynamic Form on it along with some additional Dynamic Querystring parameters. So basically you're building a Dynamic URL path.

    So if when the Edit link is clicked you'll want to pass:

    www.yoursite.com/pagewithDynamicForm.aspx?DSParam1=[dynamictoken]&DBUpdate=True

    You'll notice that the DSParam1 and DBUpdate hidden fields should be collecting the Querystring values that were passed via the URL.

    Let me know if you're able to get this far and if this gets you over the obstacle that you're facing.

    Thanks,

    Ryan





    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-17-2013 09:21 AM
    Also when Initial SQL Binding, values returned will only map to Questions on your form that match the returned column names.

    For instance, let's say that I have 3 Questions on my Dynamic Form, and these are the short field names:

    * Website
    * Phone
    * Gender

    If I have the following Initial SQL Bind Query:

    Select WebSite, Phone, Gender from yourTable where UniqueID = '$(DSParam1)'

    Then you can see how the columns names being selected match the Short Field names of the Dynamic Form questions.

    SO this example would be successful if there weren't any errors in your SQL.

    This example would be unsuccessful:

    Select FirstName, LastName, Email from yourTable where UniqueID = '$(DSParam1)'

    Now the SQL Query is valid and it will probably return a record, however the Shortfield names are matching with the Column names therefor the SQL Bind won't map the returned information to the Website, Phone and Gender fields.

    Please let me know if you have any questions.

    Thanks,

    Ryan
    Régis MATHONUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    01-18-2013 03:28 AM

    Thanks for your answer.
    It's very clear. I forgot DBUpdate on form !!
    That's working right now.

    Another question:
    I used DNN reports module.
    How can I put edit and delete links on Dynamic Views?

    Thanks

    Régis

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-18-2013 05:01 AM
    Hello Regis,

    Dynamic Views allow you to provide a data source(View or Table Name, Dynamic FOrms instance, Custom SQL QUery and JSON Request) to generate columns. Any columns that are generated are accessible in the Dynamic Views Templates.

    Dynamic Views has 5 templates, however you're going to focus on "Item List Template". You can build a Dynamic URL in this template by simply building a URL in the href of your anchor tag that includes tokens.

    Tokens are the Column names that were generated from the data source you provided.

    An example Dynamic URL would be:

    a href="/yourpage.aspx?DSParam1=[userid]&DBUpdate=True"


    Please let me know if you have any questions.

    Thanks,

    Ryan
    Régis MATHONUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    01-19-2013 12:07 AM
    Thanks Ryan, works fine witk link...

    Another question: In démo 11, youy're using 3 tables, AdventureWorks.Production.product + .Category +. SubCategory.
    Where can I find these tables to put on my local instance?

    Thanks

    Régis
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-21-2013 05:40 AM
    Hello Regis,

    The 3 tables referenced in Demo 11 aren't apart of a DNN database. Typically, AdventureWorks is an example Database that SQL Server provides.

    You may need to go digging in your SQL Server instance to find this database. Please note that Demo 11 is simply a demo and that's why AdventureWorks database was being used.

    Please let me know if you have any questions.

    Thanks,

    Ryan

    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