1

For some reason I cannot get the update command to work on my SqlDataSource in ASP.NET 4.5. This is what I have it set up as currently. It is supposed to get values from a GridView called GridView1 with Data Fields of the appropriate type.

The exact error I'm getting is ORA-01747: invalid user.table.column, table.column, or column specification.

Does anyone know what might be wrong with my configuration? Thank you!

<asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:TEST %>" ProviderName="<%$ ConnectionStrings:BTEST.ProviderName %>"
                   SelectCommand="SELECT * FROM &quot;Z_PCARD_PRELOAD&quot;"
                   UpdateCommand="UPDATE &quot;Z_PCARD_PRELOAD&quot;
                                  SET [PP_ACCI] = @PP_ACCI, [PP_ACCT] = @PP_ACCT, [PP_ACTV] = @PP_ACTV, [PP_EMPL_ID] = @PP_EMPL_ID
                                  WHERE [PP_TRANS_REF_NUM] = @PP_TRANS_REF_NUM" >
    <UpdateParameters>
        <asp:ControlParameter ControlID="GridView1" Name="PP_ACCI" PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="GridView1" Name="PP_ACCT" PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="GridView1" Name="PP_ACTV" PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="GridView1" Name="PP_EMPL_ID" PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="GridView1" Name="PP_TRANS_REF_NUM" PropertyName="SelectedValue" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>
2
  • Does the select work? I didn't think &quot; was a valid wrapper for a table name? Maybe [ and ] instead? Commented Jul 3, 2013 at 19:11
  • The select does, yes. They were added when the SelectCommand was generated. I had to add the UpdateCommand manually because I am not updating every column. Commented Jul 3, 2013 at 19:25

1 Answer 1

1

It looks like Oracle DBs request that I use the :parameter syntax instead of @parameter syntax. For future reference.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.