Quote:
Originally Posted by Plater
I am not positive but maybe something like:
-
<asp:SqlDataSource ID="oraDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:oraDB %>" ProviderName="<%$ ConnectionStrings:oraDB.ProviderName %>" SelectCommand='SELECT * FROM "MY_ASSOCIATES" WHERE ("USERID" = <%=strNTUser %>)'>
-
It seems like the strNTUser variable isn't getting set in the SQL. If I'm setting strNTUser in Page_Load event is it still in context when the ASP portion of the page runs? Here's where I create strNTUser:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim strNTUser As String
Dim iPos As Integer
strNTUser = RTrim(Request.ServerVariables("LOGON_USER"))
iPos = Len(strNTUser) - InStr(1, strNTUser, "\", CompareMethod.Binary)
strNTUser = Right(strNTUser, iPos)
End Sub
And I'm not using it until much later in the ASP
<asp:SqlDataSource ID="oraDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:oraDB %>" ProviderName="<%$ ConnectionStrings:oraDB.ProviderName %>" SelectCommand='SELECT * FROM "MY_ASSOCIATES" WHERE ("USERID" = <%=strNTUser %>)'>
Am I even going in the right direction with this...?