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!

Feasibly to add SQL script to update seperate SQL Table?
Last Post 02-15-2011 08:46 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
Shawn RomineUser is Offline
Posts:73
Avatar

--
01-18-2011 07:49 AM

    I am not an SQL expert, so hoping someone in this community might be able to help.

    Question: Using Dynamic Forms, can I issue a SQL command that would update the data in a seperate SQL table?

    Background:  We are studying the feasibility of using Dynamic Forms as a means for a scholarship student to login to our scholarship management system and accept their scholarship award.

    If they say Yes, what I would like to do is issue an sql command that will update an SQL table that is outside of dotnetnuke (still same SQL server, just a different table).

    Is this possible?

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

    --
    01-18-2011 11:42 AM
    Hello Shawn,

    Is this different table on a separate database then your DotNetNuke? Or is it within the same DotNetNuke database?

    I would have a form completion event that would only fire if the user selects "Yes" whether it's a radio button, checkbox or a combo box.

    If this is within the same server I'm sure you can reference the table as long as you use the object qualifier if one exists and the dbo namespace.

    If you have any questions please let me know. The main answer is yes this can be done.

    Thanks,

    Ryan
    Shawn RomineUser is Offline
    Posts:73
    Avatar

    --
    02-07-2011 09:05 AM
    The outstanding tech support for DataSprings helped me along with this project with the following code. I post it here in case it helps anyone else. What the following script does is find the associated dnn username with a dynamic forms UserID, set a date, and then pass these to a stored procedure.

    
    Declare @MyUserName nvarchar(200)
    Set @MyUserName =(Select Username from Users where UserID = $(UserID))
    Declare @MyDate nvarchar(200)
    Set @MyDate = (Select GetDate())
    EXEC test.dbo.test2 @MyUserName, @MyDate
    
    Shawn RomineUser is Offline
    Posts:73
    Avatar

    --
    02-07-2011 09:09 AM
    I do have one more question. I now would like to use a portion of the above SQL script to populate a field called DnnUserName. Basically I want to execute the SQL to get the username and store it in a field. I am trying to use a client side event on a hidden text field, but it doesnt seem to be working. Below is the code I copied into the Client Side Event of the field. The $(DnnUserName) is the name of the dynamic forms field.

    
    Declare @MyUserName nvarchar(200)
    Set @MyUserName =(Select Username from Users where UserID = $(UserID))
    $(DnnUserName)=@MyUserName
    
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    02-07-2011 09:35 AM
    Hello Shawn,

    I would use a SQL default on a field in which you want the User name value to reside in.

    Perhaps the SQL will look like this:

    Select UserName from users where userID = '$(UserID)'

    If you have any questions please let me know.

    Thanks,

    Ryan
    Shawn RomineUser is Offline
    Posts:73
    Avatar

    --
    02-07-2011 11:29 AM
    I am trying to use this, but not working quite yet. Couple of things. Do I actually need the ' 'around the $(UserID) variable? Also, I notice this text at the bottom of the SQL default value. Do I need to integrate this DefaultValue, because i am using a hidden field.

    "Note: To enable SQL as a default value for textbox or hidden field types you MUST select only one column from the database and that column must be named DefaultValue. i.e. Select count(*) As DefaultValue from users "

    So, this is the SQL code I am trying to use.......
    [CODE]
    Select DefaultValue from users where UserID=$(UserID)
    [\code]

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

    --
    02-15-2011 08:46 AM
    Hello Shawn,

    No you don't need to use the 's around the $(UserID) token for it's an INT.

    But your default value is setup incorrectly.

    Try:

    Select columnName As DefaultValue From Users where UserID = $(UserID)

    If you have any questions please let me know.

    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