Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-01036: illegal variable name/number

Status
Not open for further replies.

sim133

Technical User
Sep 14, 2004
85
US
Hi all,

ORA-01036: illegal variable name/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: System.Data.OracleClient.OracleException: ORA-01036: illegal variable name/number

Can someone look at it and point me why I am getting this error msg. thanks for the help

Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]

<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" /><br />
        <br />
        <br />
        &nbsp; &nbsp;&nbsp;
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ITEM,ISPECYR"
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="IUNITS" HeaderText="IUNITS" SortExpression="IUNITS" />
                <asp:BoundField DataField="IDESCL2" HeaderText="IDESCL2" SortExpression="IDESCL2" />
                <asp:BoundField DataField="IDESCR" HeaderText="IDESCR" SortExpression="IDESCR" />
                <asp:BoundField DataField="ITEM" HeaderText="ITEM" ReadOnly="True" SortExpression="ITEM" />
                <asp:BoundField DataField="ISPECYR" HeaderText="ISPECYR" ReadOnly="True" SortExpression="ISPECYR" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT item, ispecyr, idescr, idescrl, iunits, iobselet  FROM itemlist WHERE ispecyr = '01'   AND iobselet = 'N'   AND (idescrl LIKE '%' || UPPER (TRIM ('&IDESCRL')) || '%')">
            <SelectParameters>
                <asp:ControlParameter ControlID="TextBox1" Name="IDESCR" PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
 
It's an Oracle error not an ASP.NET error so there is most likely somethign wrong with your SQL statement. Try running it directly on your Oracle database and see if it errors there.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
you name your parameter IDESCR while you use it like this

UPPER (TRIM ('&IDESCRL'))

no need for the single quotes and no I think you need a : instead of the &, but I think that depends on the oracle and oracleclient you are using.

Christiaan Baes
Belgium

"My new site" - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top