G
Guest
I'm attempting to add a variable to a WHERE clause in a SQL query datasource.
I want to add the variable in my page_load statement.
The datasource looks like this:
<asp:SqlDataSource
ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:STest %>"
SelectCommand="SELECT dbo.SAdminAdd.CID,
dbo.SAdminAdd.Server, dbo.SAdminAdd.CreatedDate, dbo.SAddStatus.notes,
dbo.SAddStatus.updateTime, dbo.SStatusNames.fullname FROM dbo.SAdminAdd INNER
JOIN dbo.SAddStatus ON dbo.SAdminAdd.CID = dbo.SAddStatus.CID INNER JOIN
dbo.SStatusNames ON dbo.SAddStatus.status = dbo.SStatusNames.status WHERE
(dbo.SAdminAdd.UID = <variable here>)">
</asp:SqlDataSource>
Any help is greatly appreciated.
I apologize if I have selected the wrong newsgroup.
I want to add the variable in my page_load statement.
The datasource looks like this:
<asp:SqlDataSource
ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:STest %>"
SelectCommand="SELECT dbo.SAdminAdd.CID,
dbo.SAdminAdd.Server, dbo.SAdminAdd.CreatedDate, dbo.SAddStatus.notes,
dbo.SAddStatus.updateTime, dbo.SStatusNames.fullname FROM dbo.SAdminAdd INNER
JOIN dbo.SAddStatus ON dbo.SAdminAdd.CID = dbo.SAddStatus.CID INNER JOIN
dbo.SStatusNames ON dbo.SAddStatus.status = dbo.SStatusNames.status WHERE
(dbo.SAdminAdd.UID = <variable here>)">
</asp:SqlDataSource>
Any help is greatly appreciated.
I apologize if I have selected the wrong newsgroup.