Hi all
I'm using the following data source to populate a gridview. It is supposed to only return the records for the current user who is logged in.
Whilst it doesnt return an error message to say there's a problem with the statement, it isnt returning any results either. There are records for this user in the database.
Can anyone please tell me where I am going wrong?
Many thanks
Daniel
I'm using the following data source to populate a gridview. It is supposed to only return the records for the current user who is logged in.
Code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:StPaulsDatabase %>"
SelectCommand="SELECT [observeTeacher], [observeBy], [observeReason], [observeFocus], [observeDate] FROM [Observations] WHERE ([observeBy] = @observeBy)">
<SelectParameters>
<asp:ProfileParameter Name="observeBy" PropertyName="UserName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Whilst it doesnt return an error message to say there's a problem with the statement, it isnt returning any results either. There are records for this user in the database.
Can anyone please tell me where I am going wrong?
Many thanks
Daniel