Can you please check your update statement. UPDATE [iic.lu_holidays] SET [NAME] = @NAME, [HOLIDAY_DATE] = @HOLIDAY_DATE, [SEQUENCE] = @SEQUENCE, [COMMENTS] = @COMMENTS, [COUNTRY_RO] = @COUNTRY_RO WHERE [ID] = @ID"
Is the iic. required ? also there is no need of square brackets in column names. Please check if your column names exist.
Also can you check if the parameter names are good as i can't see any tag for the parameters defined in insert and update. example @ID is not shown as defined in the Grid parameters of type insert/update.
Thanks,
Bhawesh
MCSD-EA, MCSD, MCTS
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
nishapd
Member
8 Points
33 Posts
ORA-01036: illegal variable name/number
Aug 17, 2009 07:35 PM|LINK
Here is my code and I am not sure why I am getting 'ORA-01036: illegal variable name/number' error ? I would appreciate your help. Thanks.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT ID,NAME,HOLIDAY_DATE,SEQUENCE,COMMENTS,COUNTRY_RO FROM LU_HOLIDAYS"
UpdateCommand="UPDATE [iic.lu_holidays] SET [NAME] = @NAME, [HOLIDAY_DATE] = @HOLIDAY_DATE, [SEQUENCE] = @SEQUENCE, [COMMENTS] = @COMMENTS, [COUNTRY_RO] = @COUNTRY_RO WHERE [ID] = @ID">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateEditButton="True">
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" Visible="False" />
<asp:BoundField DataField="NAME" HeaderText="NAME" SortExpression="NAME" />
<asp:BoundField DataField="HOLIDAY_DATE" HeaderText="HOLIDAY_DATE" SortExpression="HOLIDAY_DATE" />
<asp:BoundField DataField="SEQUENCE" HeaderText="SEQUENCE" SortExpression="SEQUENCE" />
<asp:BoundField DataField="COMMENTS" HeaderText="COMMENTS" SortExpression="COMMENTS" />
<asp:BoundField DataField="COUNTRY_RO" HeaderText="COUNTRY_RO" SortExpression="COUNTRY_RO" />
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
bhaweshkumar
Member
210 Points
34 Posts
Re: ORA-01036: illegal variable name/number
Aug 17, 2009 09:13 PM|LINK
Can you please check your update statement. UPDATE [iic.lu_holidays] SET [NAME] = @NAME, [HOLIDAY_DATE] = @HOLIDAY_DATE, [SEQUENCE] = @SEQUENCE, [COMMENTS] = @COMMENTS, [COUNTRY_RO] = @COUNTRY_RO WHERE [ID] = @ID"
Is the iic. required ? also there is no need of square brackets in column names. Please check if your column names exist.
Also can you check if the parameter names are good as i can't see any tag for the parameters defined in insert and update. example @ID is not shown as defined in the Grid parameters of type insert/update.
Bhawesh
MCSD-EA, MCSD, MCTS
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
nishapd
Member
8 Points
33 Posts
Re: ORA-01036: illegal variable name/number
Aug 18, 2009 01:04 PM|LINK
1. I have removed iic. from my query....
2. Also I have removed square brackets in column names
3. Column name already exist.
I tried to run after above changes but it is giving me the same error.
I did not get you when you said, @ID is not sohwn as defined in the Grid parameters ot type insert/update ? Can you please guide me for it ?
Thanks for your help.
matt.gulick
Member
75 Points
84 Posts
Re: ORA-01036: illegal variable name/number
Feb 05, 2013 12:51 PM|LINK
For Oracle use : instead of @ to designate variables