Hello, I'm wondering why a variable in my selectcommand is not
working.
In Page_Load I have this:
String current_user = User.Identity.Name;
Response.Write(current_user); // verified the string 'djohnson' is
present
But this errors out in the Body ('No value given for one or more
required parameters'):
<asp:AccessDataSource id="AccessDataSource1" runat="server" DataFile =
"upload.mdb" SelectCommand="Select * from Customers WHERE
Login=@current_user"/>
This, however, works:
<asp:AccessDataSource id="AccessDataSource1" runat="server" DataFile =
"upload.mdb" SelectCommand="Select * from Customers WHERE
Login='djohnson'"/>
This is very confusing.... !