grantmcconnaughey
grantmcconnaughey

Reputation: 10689

Issue with SqlDataSource in ASP.NET 4.5

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>

Upvotes: 1

Views: 225

Answers (1)

grantmcconnaughey
grantmcconnaughey

Reputation: 10689

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

Upvotes: 1

Related Questions