I am designing a website that queries an SQL database when opened, providing a list of bills for the given user. I am using a custom SQL query with a Data Source/Data View and in the Command & Parameters window I have also specified a parameter 'userName' from the Cache value 'IDSID' (which is available when logged into the website). However, when I try to view the website, no results are output. It has the title of the View and 'Rows:' but no actual results. I even included a 'PRINT @userName' command at the end of the stored procedure so it seems to me that Sharepoint is not correctly grabbing the information from cache. I don't really know where to go from here as I am very new to Sharepoint and Google doesn't seem to provide much answers for me (at least, not that I can see). I would really appreciate any and all help - anything I might have missed? If you need any more information please let me know!
You can try using
<ParameterBinding Name="LogonUser" Location="ServerVariable(LOGON_USER)"/>
These are few IIS Server Variables
REMOTE_USER.. that you can use..