All, I am having issues using a like clause in a query against an Oracle Database.
I have attached the oracle database. I have a repeater control - the sqldatasource is below.
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand="SELECT * FROM INSTITUTIONS WHERE (NAME LIKE '%' + :NAME + '%')"><SelectParameters><asp:FormParameter DefaultValue="Adams" FormField="ctl00$cph1$instName" Name="NAME" Type="String" /></SelectParameters></asp:SqlDataSource>The error I'm getting is ...
ORA-01722: invalid number Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Oracle.DataAccess.Client.OracleException: ORA-01722: invalid number Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [OracleException (0x80004005): ORA-01722: invalid number] Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) +1316 Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck) +69 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) +6037 Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +550 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +86 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1482 System.Web.UI.WebControls.Repeater.GetData() +55 System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +89 System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +61 System.Web.UI.WebControls.Repeater.DataBind() +105 System.Web.UI.WebControls.Repeater.EnsureDataBound() +49 System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +15 System.Web.UI.Control.PreRenderRecursiveInternal() +83 System.Web.UI.Control.PreRenderRecursiveInternal() +168 System.Web.UI.Control.PreRenderRecursiveInternal() +168 System.Web.UI.Control.PreRenderRecursiveInternal() +168 System.Web.UI.Control.PreRenderRecursiveInternal() +168 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
Anybody have any idea what I'm doing wrong. I'm not a newbie; but it's been a while since I've done any development in .net.