1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Trying to pass LoginID field from stored procedure using a link

Discussion in 'C#' started by bootsy, Apr 12, 2012.

  1. #1
    I have a stored procedure that selects 3 fields. One of them is called LoginID. I am trying to pass login ID on an asp page through a link but am having trouble getting the login ID to show for the link. The code I have so far doesn't seem to work and I'm not sure what I'm doing wrong:

    dim m_rsLoginSettings
    dim m_lngLoginID
    dim m_lngPrintLoginID
    set m_objDataAccess = Server.CreateObject("Login.clsPrintMaterial")
    set m_rsLoginSettings = Server.CreateIbject("ADODB.Recordset")
    
    Set m_rsLoginSettings = m_objDataAccess.getAdors(m_objError, "prLogin_selLoginList", clng(m_lngPrintLoginID))
    
    m_lngPrintLoginID = m_rsLoginSettings("LoginID")
    
    
    Link:
    
     m_strTESystemFormHREF = "https://printedmaterial.trails-end.com/passthru.axd?lid=" & m_lngPrintLoginID
    Code (markup):
    Here also is part of the stored procedure that calls the select statement where @v_intUserID parameter equals UserID. This statement get the LoginID, Username, and Password by joining Users and Login tables. Both of these tables link together:

    SELECT
    
    UserName, [Password], LoginID
    
    FROM vwUser
    
    LEFT JOIN vwLink
    
    ON vwLink.ParentTypeID = 1
    
    AND vwLink.ChildTypeID = 2
    
    AND vwLink.ChildID = vwUser.UserID
    
    INNER JOIN vwLogin
    
    ON vwLink.ParentID = vwLogin.LoginID
    
    WHERE vwUser.UserID = @v_intUserID
    
    ORDER BY vwLogin.Seed DESC
    Code (markup):
     
    bootsy, Apr 12, 2012 IP