This is a migrated thread and some comments may be shown as answers.

ORA-01036: illegal variable name/number

3 Answers 159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bin zhang
Top achievements
Rank 1
bin zhang asked on 19 Apr 2010, 10:57 AM
Hi everyone;
        My radgrid bind sqldatasource. and My sqldatasource connect Oracle 10 database.    I want radgrid autoupdate. so I config the sqldatasource updatecommand and UpdateParameters. but when i edit the radgrid row. i appear a error: ORA-01036: illegal variable name/number
    my updatecommand like this   " update siteannvavle set a=:a,b=:b where c=:c"
 <UpdateParameters>
  </UpdateParameters>

 what's wrong?    did radgrid suport oracle 10g?

3 Answers, 1 is accepted

Sort by
0
Lenny_shp
Top achievements
Rank 2
answered on 19 Apr 2010, 02:04 PM
I had to define the columns as in this example.

http://www.telerik.com/help/aspnet-ajax/grdautomaticdatasourceoperations.html
0
bin zhang
Top achievements
Rank 1
answered on 20 Apr 2010, 09:22 AM
My code is this. please tell me what's wrong with it? "illegal variable name/number"

<telerik:RadGrid ID="RadGrid1"  runat="server" AllowAutomaticUpdates="True"
                AllowPaging="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1"
                GridLines="None">
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>

<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="PIPOREXPLOR" HeaderText="PIPOREXPLOR"
            SortExpression="PIPOREXPLOR" UniqueName="PIPOREXPLOR">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LINELOOPNAME" HeaderText="LINELOOPNAME"
            SortExpression="LINELOOPNAME" UniqueName="LINELOOPNAME">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="SITETYPE" HeaderText="SITETYPE"
            SortExpression="SITETYPE" UniqueName="SITETYPE">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="SITEORVALVENAME"
            HeaderText="SITEORVALVENAME" SortExpression="SITEORVALVENAME"
            UniqueName="SITEORVALVENAME">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="REMARKS" HeaderText="REMARKS"
            SortExpression="REMARKS" UniqueName="REMARKS">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FIELDSNAME" HeaderText="FIELDSNAME"
            SortExpression="FIELDSNAME" UniqueName="FIELDSNAME">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="BELONGFIELDCODE"
            HeaderText="BELONGFIELDCODE" SortExpression="BELONGFIELDCODE"
            UniqueName="BELONGFIELDCODE">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="EVENTID" HeaderText="EVENTID"
            SortExpression="EVENTID" UniqueName="EVENTID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ORDERCODE" DataType="System.Decimal"
            HeaderText="ORDERCODE" SortExpression="ORDERCODE" UniqueName="ORDERCODE">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
            </telerik:RadGrid>
        </div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:APDMConnectString %>"
            ProviderName="<%$ ConnectionStrings:APDMConnectString.ProviderName %>"
             ConflictDetection="OverwriteChanges"
            SelectCommand="SELECT &quot;PIPOREXPLOR&quot;, &quot;LINELOOPNAME&quot;, &quot;SITETYPE&quot;, &quot;SITEORVALVENAME&quot;, &quot;REMARKS&quot;, &quot;FIELDSNAME&quot;, &quot;BELONGFIELDCODE&quot;, &quot;EVENTID&quot;, &quot;ORDERCODE&quot; FROM &quot;SITEANDVALVE&quot;"
            UpdateCommand="UPDATE SITEANDVALVE SET PIPOREXPLOR = :PIPOREXPLOR, LINELOOPNAME = :LINELOOPNAME, SITEORVALVENAME = :SITEORVALVENAME, SITETYPE = :SITETYPE, REMARKS = :REMARKS, ORDERCODE = :ORDERCODE, FIELDSNAME = :FIELDSNAME WHERE (EVENTID = :EVENTID)">
            <UpdateParameters>
                <asp:Parameter Name="PIPOREXPLOR" Type="String" />
                <asp:Parameter Name="LINELOOPNAME" Type="String" />
                <asp:Parameter Name="SITEORVALVENAME" Type="String" />
                <asp:Parameter Name="SITETYPE" Type="String" />
                <asp:Parameter Name="REMARKS" Type="String" />
                <asp:Parameter Name="ORDERCODE" Type="Double" />
                <asp:Parameter Name="FIELDSNAME" Type="String" />
                <asp:Parameter Name="EVENTID" Type="String" />
            </UpdateParameters>
        </asp:SqlDataSource>


0
Yavor
Telerik team
answered on 23 Apr 2010, 07:41 AM
Hi bin zhang,

I reviewed the code, and the setup looks correct. If the issue persists, you can open a formal support ticket, and send us a small working project, demonstrating your setup. We will debug it locally, and advise you further.

Sincerely yours,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
bin zhang
Top achievements
Rank 1
Answers by
Lenny_shp
Top achievements
Rank 2
bin zhang
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or