I'm using an sqlDataSource for a grid control. But i'm having issues when executing the insert command. I'm using Oracle.DataAccess.Client as the provider.
This is the code sqlDataSource generated
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
InsertCommand="INSERT INTO "EE_AP_KPIS" ("ID", "TITLE", "SECTION_ID", "DISPLAY_TITLE", "SORT") VALUES (?, ?, ?, ?, ?)"
ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>"
SelectCommand="SELECT * FROM "EE_AP_KPIS"">
<InsertParameters>
<asp:Parameter Name="ID" Type="Decimal" />
<asp:Parameter Name="TITLE" Type="String" />
<asp:Parameter Name="SECTION_ID" Type="Decimal" />
<asp:Parameter Name="DISPLAY_TITLE" Type="String" />
<asp:Parameter Name="SORT" Type="Decimal" />
</InsertParameters>
</asp:SqlDataSource>
I get the following error Oracle.DataAccess.Client.OracleException: ORA-00911: invalid character
I realise it could be a value in my data but I want to confirm if the code above looks OK? I'm not sure if the sqlDataSource has generated the sql correctly. Is VALUES (?, ?, ?, ?, ?) the correct way to bind variables? If not, any idea why it generated it like this?
Aucun commentaire:
Enregistrer un commentaire