Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are many resons why this comes up. Sometimes because we don't use the Oracle tools and sometimes because of incorrect gridview markup.</p> <p>since you do not require to update value of Column: <code>charge_id</code> , you cannot use a BoundField for the same unless you specify it in <code>DataKeyNames</code> property of <code>SqlDataSource</code>. </p> <p>A BoundField if not specified in <code>DataKeyNames</code> ,generates a bind variable which if not used in the update statement will result in ORA-01036. To avoid the error, either specify this field in <code>DataKeyNames</code> property OR change this to a TemplateField and use Eval.so two possible cases I forsee:</p> <p>1.) Set the <code>DataKeyNames</code> property of your SqlDataSource to <code>charge_id</code> . </p> <pre><code>&lt;asp:SqlDataSource ID="charges_gv_datasource" runat="server" ConnectionString="edited" ProviderName="System.Data.OracleClient" DataKeyNames="charge_id" SelectCommand="WITH relevant_ids AS (SELECT ir.result_id AS relevant_result_id FROM inspection_result_tbl ir) SELECT ir.charge_id, ....." UpdateCommand="UPDATE [charges_tbl] SET [CLAIM_VERIFICATION] = :claim_verification,..."&gt; </code></pre> <p>2.) If option 1 doesn't suits then :</p> <p>Seeing your markup, definitely you have your <code>&lt;EditItemTemplate&gt;</code> in place as you haven't shown the same for many of <code>&lt;asp:TemplateField&gt;</code> items.</p> <p>Make sure then you put your <code>charge_id</code> column in an <code>&lt;asp:TemplateField&gt;</code>. Use <code>&lt;asp:Lable&gt;</code> so it won't be changed even in edit mode.</p> <pre><code>&lt;asp:TemplateField HeaderText="charge_id" SortExpression="charge_id"&gt; &lt;EditItemTemplate&gt; &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Eval("charge_id") %&gt;'&gt;&lt;/asp:Label&gt; &lt;/EditItemTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Bind("charge_id") %&gt;'&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; </code></pre> <p><strong>Seeing the Stack Trace provided Later On,</strong> : Better to Use Oracle Developer Tools (ODT) for VS and ODP.NET since they are better integrated with .NET and Oracle.</p> <p><code>ODP.NET</code> uses <code>Oracle.DataAccess.Client</code> namespace. <code>System.Data.OracleClient</code> belongs to the MS provider for Oracle. The connection string in the <code>web.config</code> needs to use the <code>Oracle.DataAccess.Client</code> as shown below:</p> <pre><code>&lt;connectionStrings&gt; &lt;add name="ConnectionString1" connectionString="Data Source=192.168.1.104/orcl;Persist Security Info=True;User ID=system;Password=xxxxxx;" providerName="Oracle.DataAccess.Client" /&gt; &lt;/connectionStrings&gt; </code></pre> <p>Go through this complete post for your reference: <a href="https://forums.oracle.com/message/2368331?#2366331http://forums.oracle.com/forums/thread.jspa?threadID=62196" rel="nofollow">https://forums.oracle.com/message/2368331?#2366331http://forums.oracle.com/forums/thread.jspa?threadID=62196</a> </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload