prometeusx
New Member
System.Data.OleDb.OleDbException: One or more errors occurred during processing of command.ORA-00936: missing expressionThis is the error I get. Any suggestions?My ashx handler code is:\[code\] public class Handler1 : IHttpHandler{ public void ProcessRequest(HttpContext context) { OracleConnection conn = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=http://stackoverflow.com/questions/15853927/(SERVER=DEDICATED)(SERVER_NAME=XE)));User Id=sakthi_studdb;Password=sakthi;"); OracleCommand cmd = new OracleCommand(); cmd.CommandText = "Select IMG_NAME, IMG_IMAGE from MYIMGTABLE where IMG_ID =:IMG_ID"; cmd.CommandType = System.Data.CommandType.Text; cmd.Connection = conn; OracleParameter ImageID = new OracleParameter(":IMG_ID",OracleDbType.Int32); ImageID.Value = http://stackoverflow.com/questions/15853927/context.Request.QueryString["IMG_ID"]; cmd.Parameters.Add(ImageID); conn.Open(); OracleDataReader dReader = cmd.ExecuteReader(); dReader.Read(); context.Response.BinaryWrite((byte[])dReader["IMG_IMAGE"]); dReader.Close(); conn.Close(); } public bool IsReusable { get { return false; } }}\[/code\]My aspx code is:\[code\] <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="IMG_ID"> <Columns> <asp:BoundField DataField="IMG_ID" HeaderText="IMG_ID" InsertVisible="False" ReadOnly="True" SortExpression="IMG_ID" /> <asp:BoundField DataField="IMG_NAME" HeaderText="IMG_NAME" SortExpression="IMG_NAME" /> <asp:TemplateField HeaderText="IMG_IMAGE"> <ItemTemplate> <asp:Image ID="Image1" runat="server" ImageUrl='<%# "Handler1.ashx?IMG_ID=" + Eval("IMG_ID")%>'/> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" SelectCommand="SELECT [IMG_ID],[IMG_NAME],[IMG_IMAGE] FROM [MYIMGTABLE]"> </asp:SqlDataSource>\[/code\]This is the last puzzle for completing my project... Help!