我想在Select语句中使用GET中的变量(page.aspx?var = val)
我试过":"我收到错误:Oracle.DataAccess.Client.OracleException:ORA-01008:并非所有变量都绑定 当使用" @"得到这个:Oracle.DataAccess.Client.OracleException:ORA-00936:缺少表达式
<asp:SqlDataSource
ID="SqlDataSource1" Runat="server"
SelectCommand="SELECT * from table where field=:var"
ConnectionString="<%$ ConnectionStrings:ProdConnectionString%>"
ProviderName="Oracle.DataAccess.Client" />
<SelectParameters>
<asp:QueryStringParameter Name="var" QueryStringField="var" DefaultValue = "0" />
</SelectParameters>
</asp:SqlDataSource>