So I've been mucking about with MS sql server and building up a simple web application with a number of queries, however I have now been asked to generate some reports from a oracle dB and I've run in to a dead end when trying to use control parameters.
As an example within asp;
So the above query returns rows where d equals controld in a drop down list. The above approach works fine when running it against MS sql server but oracle fails with "illegal variable name/number". Is there an equivalent means/syntax to accomplish the above when interacting with oracle?
Cheers, Paul.
As an example within asp;
Code:
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:foo %>"
SelectCommand="SELECT a , b , c , d FROM footable WHERE (d = @controld OR @controld = '-1' OR @controld IS NULL)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="controld"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Cheers, Paul.
Last edited: