SQLGridSelectedView question
Last Post 04/25/2011 5:56 AM by christina white. 13 Replies.
Author Messages
lynn
Nuke Master
Nuke Master
Posts:276


--
04/15/2006 4:29 AM

    Hi Lee

    I am in the process of using the SQLGridSelectedView module which is Free from www.tressleworks.ca.  It looks like a great module, however, at this point in time I am a little unsure.

    Will you at some point in the very near future include an article on this module,? If not,do you know of an existing article, that I might read in the meantime. I have downloaded the documentation included with the module, but I need spoonfeeding.

    Regards

    Lynn

    Lee Sykes
    DNN Creative Staff
    Nuke Master VI
    Nuke Master VI
    Posts:4945


    --
    04/16/2006 3:32 AM
    Hi Lynn,

    Yes it looks like a useful module. - Could you outline what in particular you wish to achieve with this module and what you need help in?

    If it's the construction of the SQL statements, then you would probably be better off searching round for books or SQL resource sites as this is a giant topic in itself.

    Let me know what you need and I will see what I can do. I'm currently working on issue 9 and the following issue is probably already full (no.10), so I will most likely be able to fit it into no.11 - July.

    Thanks,
    Lee Sykes
    Site Administrator
    Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

    Twitter: www.twitter.com/DNNCreative

    Lee Sykes's Facebook Profile
    lynn
    Nuke Master
    Nuke Master
    Posts:276


    --
    04/17/2006 6:06 AM

    Hi Lee

    Thanks for the reply. 

    I am trying to give the user a multiple selection choice of a database table but I am not sure of the sql syntax.

    E.g.

    SELECT  Fruit,  FruitName, Cost

    FROM  FruitShop

    WHERE  Fruit ='apple' ,  ='pear', ='grape'

    WHERE Cost = '1.00', = '2.00' = '3.00'

    What do I need to edit?

    Thanks

    Lynn

    lynn
    Nuke Master
    Nuke Master
    Posts:276


    --
    04/18/2006 6:40 AM

    Hi Lee

    I have tried various combinations of the WHERE statements without success. 

    The PDF document suggests:

    Select <fields> from <tables> [where <where clause> ] [order by <sort fields>]]

    Example given:

    SELECT

    Employees.County, Employees.LastName, Employees.FirstName,

    Orders.ShippingDate,  Orders.OrderID, [Orders Subtotals]. Subtotal AS [Sale Amount ]

    FROM

    Employees INNER JOIN

    (Orders INNER JOIN [Orders Subtotal ] ON Orders.OrdersID = [ Order Subtotals ].OrderID)

    ON Employee.Employee.ID =Orders.EmployeeID

    Any suggestions?

    Thanks

    Lynn

    Lee Sykes
    DNN Creative Staff
    Nuke Master VI
    Nuke Master VI
    Posts:4945


    --
    04/18/2006 11:05 AM

    Hi Lynn,

    Within your WHERE clause, you don't want to enter commas, you want to use AND or OR words, eg.

    SELECT * FROM sitelog
    WHERE SiteLogID < 99 AND SiteLogId > 5

    Hope this helps,

    thanks,

    Lee Sykes
    Site Administrator
    Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

    Twitter: www.twitter.com/DNNCreative

    Lee Sykes's Facebook Profile
    Nikhil omer
    Nuker
    Nuker
    Posts:11


    --
    04/09/2011 2:36 AM
    Hello Lee

    I am using SQLGridSelectedView to show document log which is uploaded by various user.
    Now problem is to download the file because Site Editor first check log then goto filemanager and navigate whole tree folder and download the file and this is done again for next user.
    It is very complicated task so there is any solution of this problem to Download file at same time when Site Editor see SQLGridSelectedView log.

    File is uploaded with the Dynamic form.
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    04/09/2011 9:08 AM
    How do you generate the list of files using SGSV? Depending on how you do it, you might be able to generate a download link as part of your query.

    (I have done similar things using SGSV, so please provide more details on how you are doing things.)

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Nikhil omer
    Nuker
    Nuker
    Posts:11


    --
    04/10/2011 1:39 AM
    Thank you Craig for reply me,

    I am using this query in Dynamic Form to insert File Information in to “DynamicForms_CustomTable_624” Table.

    “INSERT INTO {databaseOwner}[{objectQualifier}DynamicForms_CustomTable_624]
    ([UniqueCompletionID],[ResponseDateTime],[UserID],[IPAddress],[filename],[summary])
    VALUES ('$(UniqueCompletionID)',GetDate(),$(UserID),'$(IPAddress)','$(filename)','$(summary)')”

    In File Attachment Field
    Alternative Upload Folder Folder1/Folder2

    I used this Query to show File data in SGSV which is uploaded previously.

    “Select Users.UserName AS [User Name], dateadd(hour,16, D.ResponseDateTime) as [File Upload Time],D.filename as [File Name],D.summary as Comments, D.IPAddress
    FROM DynamicForms_CustomTable_624 as D
    join Users on Users.UserID=D.UserID
    join UserRoles on D.UserID=UserRoles.UserID
    join Roles on UserRoles.RoleID=Roles.RoleID
    where
    Roles.RoleID=15”

    Sir How I created Download link in this Query that show in SGSV.
    Files are Saved in Folder1/Folder2.
    Sir Please help me, I am stuck with this problem
    Thank you.
     
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    04/10/2011 8:34 AM
    You also need to know the portal number, which I will assume is 0 so that the files are actually stored in /Portals/0/Folder1/Folder2.

    In your SGSV query, instead of

    D.filename as [File Name]

    Use this

    '

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Nikhil omer
    Nuker
    Nuker
    Posts:11


    --
    04/12/2011 12:08 PM
    Thank you Craig
    Hyperlink is working.

    But i am stuck in a new problem.
    In SGSV query i need to get current user.Because i have to see only current user File log.

    Select Users.UserName AS [UserName],
    '' + D.[Assignment File]+ '
    ' as Files
    , D.ResponseDateTime,
    D.[Comments(if any)] as Comments, D.IPAddress
    FROM Roles,Users,UserRoles,DynamicForms_CustomTable_836 as D where
    Roles.RoleID=UserRoles.RoleID and Users.UserID=D.UserID and
    Users.UserName=$(userName)

    Plese help me how i campare with current user.
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    04/12/2011 12:14 PM
    Take a look at Appendix A of the User Manual. You can use a number of tokens, including [DNN:USERINFO:Username].

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Nikhil omer
    Nuker
    Nuker
    Posts:11


    --
    04/13/2011 12:42 AM
    I used this tokens

    Users.UserName=$(userName)
    D.UserID='$(UserId)'

    but it giving error can not convert to varchar to int.

    Sir Please correct this query.
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    04/13/2011 8:58 AM
    You will need to "cast" the int to a varchar (or vice versa?). I assume that UserId is an int.

    You would do something like: cast($(UserId) as varchar), but I'd have to play around with this to see how to do it correctly inside of SGSV. You can use the SGSV debug mode to see the exact SQL that is being generated.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    christina white
    Nuke Newbie
    Nuke Newbie
    Posts:1


    --
    04/25/2011 5:56 AM


    Yes it looks like a useful module.
    ============================
    Resell Rights Videos


    ---