當使用 controlparamter 時, SQL server 所使用的 為 "@parameter" , 但套用到 Oracle 則會出現 "ORA-01036: illegal variable name/number" 錯誤, 正確使用方法為 ":paramter"
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringPROD %>"
ProviderName="System.Data.OracleClient"
SelectCommand="select count(*) as count from approve_v where user_name =:paramuser">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" DefaultValue="" Name="paramuser" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
Sep 16, 2008
ORA-01036: illegal variable name/number
Subscribe to:
Post Comments (Atom)
0 意見:
Post a Comment