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!

Custom SQL Query
Last Post 10-02-2013 06:36 AM by Ryan Bakerink. 8 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
NebRefUser is Offline
river guide
river guide
Posts:91
Avatar

--
09-24-2013 01:16 PM
    I have written a very long custom SQL Query to generate a table in Dynamic View incorporating multiple joins and select statements.  The query works fine when I test it in Host > SQL.  However, it has trouble saving in Dynamic Views and, if do get it to finally save, I can't go back in and edit my query at all.

    Is there a space limit on the Custom SQL Query field for Dynamic Views?  If so, how can I change this.

    Thank you.

    Jim
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    09-24-2013 05:12 PM
    Hi Jim - There might be a character limit of 2000 characters. I will need to check the code, I believe this is because the module uses the ModuleSettings table. I can give you a query you can run to set the column width of that column to 4000 or if you are able to change this to be a stored procedure instead of a query directly that might help out as well (where you pass in stored procedure parameters etc...)

    Let me know what you think.

    -Chad
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    09-27-2013 11:59 AM
    Chad:

    Unfortunately, I don't know how to create and use stored procedures yet so will have to learn how to do that. In the meantime, could you provide me with the query to increase the character limit and see how that works? Thank you.

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

    --
    09-30-2013 05:00 AM
    Hello Jim,

    You'll need to modify the size of the SettingValue column in the ModuleSettings table.

    Try the following query under Host -> SQL:

    Alter table ModuleSettings
    Alter Column SettingValue NVARCHAR(MAX)

    After executing this query go to Host -> Host Settings and restart the application.

    Let me know if this fixes the issue for you. If this doesn't, there may be 1 additional step.

    Thanks,

    Ryan
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    09-30-2013 05:40 AM
    Ryan:

    Thanks for the suggestion. I did run the query and it ran successfully. I restarted the application but no success. I can save my long query once but if I try to go back in, modify it, and save it again, it hangs and doesn't save the modifications.

    I checked, my query is about 7,500 characters not counting the spaces.

    Thanks,

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

    --
    09-30-2013 05:54 AM
    Hello Jim,

    In this case there's a couple more steps to complete this.

    1.) Go to Host -> SQL and execute this statement:

    sp_helptext "UpdateModuleSetting"

    1a.) You should see the contents of this stored procedure. Copy/paste into Notepad or SQL Server Management Studio.

    1b.) You're going to need to modify the Parameter in this stored procedure that collects the SettingValue. Should look like this "@SettingValue nvarchar(xxx)".

    Change the "xxx" to "MAX".

    1c.) Then change the CREATE statement(which is the first word in the stored procedure) to ALTER. So there's only 2 small modifications you're making.

    A.) Size of the Parameter for SettingValue
    B.) Changing CREATE to ALTER.

    After making these changes, please copy/paste this modified stored procedure into Host -> SQL and execute. After executing go to Host -> Host Settings and restart the application.

    You may want to perform the same steps for the AddModuleSetting stored procedure, this way anytime you initially create a Dynamic View(which is an Add not an Update), it'll work.

    Please let me know if you have any questions.

    Thanks,

    Ryan
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    09-30-2013 12:59 PM
    Ryan:

    I did as suggested. Both "UpdateModuleSetting" and "AddModuleSetting" were already set to "MAX" for @SettingValue but did as recommended anyway.

    Still won't save properly. Any other suggestions?

    Jim
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    09-30-2013 05:59 PM
    Ryan:

    I was able to create a stored procedure in SQL Server Management Studio that uses two variables - @club and @startdate. I am able to execute this stored procedure in Server Management Studio successfully.

    When I had Dynamic Views set up to run this query as a custom SQL query, I passed these two variables to this page from a hyperlink and the first few lines of my custom SQL query were as follows:

    Declare @club as nvarchar(50)
    Set @club='$(club)'
    Declare @startdate as datetime
    Set @startdate='$(startdate)'

    I do not know how to execute a stored procedure in Dynamic Views using the pass-through options that I have used successfully before. Any help?

    Thanks, Ryan.

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

    --
    10-02-2013 06:36 AM
    Hello Jim,

    Do you have Dynamic View Search filters on columns named club and startdate?

    If not, these two tokens( '$(club)' and '$(startdate)' ) will not render. Also with stored procedures you'll need to enable allow free form. By enabling this option it disables all Search Filters. So you'll have to manually create the filters in your WHERE clause, in your Stored Procedure or raw SQL.

    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