Click here to Skip to main content
15,900,325 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
XML
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'UPDATECSYSTEM'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I have this error when I'm trying to edit a row from datagrid. I'm using packet procedure from oracle. this is te code from the procedure:
<pre lang="sql">procedure updateCSystem(p_CSYSTEM_PK float, p_LOGIN_PK float,p_name varchar2,p_REF_ELIPSOID varchar2,p_PROJECTION varchar2, p_TYPE_CS_PK float)
 is
 begin
   update GT_CSYSTEM
   set LOGIN_PK=p_LOGIN_PK,NAME=p_name,REF_ELIPSOID=p_REF_ELIPSOID,PROJECTION=p_PROJECTION,TYPE_CS_PK=p_TYPE_CS_PK
where CSYSTEM_PK=p_CSYSTEM_PK;
 end updateCSystem;</pre>
and this is the code where i'm sendinr the parameters:
<pre lang="sql">public void UpdateCSystem(float CSYSTEM_PK, float LOGIN_PK, string NAME, string REF_ELIPSOID, string PROJECTION, float TYPE_CS_PK)
    {
        using (OracleConnection objConn = new OracleConnection(konekcija))
        {
            OracleCommand objUpdateCmd = new OracleCommand();
            objUpdateCmd.Connection = objConn;
            objUpdateCmd.CommandText = &quot;GTCSYSTEM.UPDATECSYSTEM&quot;;
            objUpdateCmd.CommandType = CommandType.StoredProcedure;
            objUpdateCmd.Parameters.Clear();
            objUpdateCmd.Parameters.Add(&quot;p_CSYSTEM_PK&quot;, OracleType.Float, 10,&quot;CSYSTEM_PK&quot;);
            objUpdateCmd.Parameters.Add(&quot;p_LOGIN_PK&quot;, OracleType.Float, 10, &quot;LOGIN_PK&quot;);
            objUpdateCmd.Parameters.Add(&quot;p_name&quot;, OracleType.VarChar, 9, &quot;NAME&quot;);
            objUpdateCmd.Parameters.Add(&quot;p_REF_ELIPSOID&quot;, OracleType.VarChar, 9, &quot;REF_ELIPSOID&quot;);
            objUpdateCmd.Parameters.Add(&quot;p_PROJECTION&quot;, OracleType.VarChar, 9, &quot;PROJECTION&quot;);
            objUpdateCmd.Parameters.Add(&quot;p_TYPE_CS_PK&quot;, OracleType.Float, 7, &quot;TYPE_CS_PK&quot;);
            try
            {
                objConn.Open();
                objUpdateCmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(&quot;Exception: {0}&quot;, ex.ToString());
            }
            objConn.Close();
        }
    }</pre>
and this is the .NET code for the objectDataSource:
<pre lang="xml">&lt;asp:ObjectDataSource ID=&quot;ObjectDataSource1&quot; runat=&quot;server&quot;
                        SelectMethod=&quot;GetAllCSystem&quot; UpdateMethod=&quot;UpdateCSystem&quot; TypeName=&quot;Store&quot;&gt;
                        &lt;UpdateParameters&gt;
                            &lt;asp:Parameter Name=&quot;CSYSTEM_PK&quot; Type=&quot;Single&quot; /&gt;
                            &lt;asp:Parameter Name=&quot;LOGIN_PK&quot; Type=&quot;Single&quot; /&gt;
                            &lt;asp:Parameter Name=&quot;NAME&quot; Type=&quot;String&quot; /&gt;
                            &lt;asp:Parameter Name=&quot;REF_ELIPSOID&quot; Type=&quot;String&quot; /&gt;
                            &lt;asp:Parameter Name=&quot;PROJECTION&quot; Type=&quot;String&quot; /&gt;
                            &lt;asp:Parameter Name=&quot;TYPE_CS_PK&quot; Type=&quot;Single&quot; /&gt;
                        &lt;/UpdateParameters&gt;
                    &lt;/asp:ObjectDataSource&gt;</pre>
Thanks in advance<b></b>
Posted
Comments
R. Giskard Reventlov 15-Jun-10 10:26am    
Unreadable: please attend to formatting and only put in the pertinent code fragments.
R. Giskard Reventlov 15-Jun-10 10:27am    
Reason for my vote of 1
See my comment.

VB
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to &#39;UPDATECSYSTEM&#39;
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


I have this error when I'm trying to edit a row from datagrid. I'm using packet procedure from oracle. this is the code from the procedure:

SQL
procedure updateCSystem(p_CSYSTEM_PK float, p_LOGIN_PK float,p_name varchar2,p_REF_ELIPSOID varchar2,p_PROJECTION varchar2, p_TYPE_CS_PK float)
 is
 begin
   update GT_CSYSTEM
   set LOGIN_PK=p_LOGIN_PK,NAME=p_name,REF_ELIPSOID=p_REF_ELIPSOID,PROJECTION=p_PROJECTION,TYPE_CS_PK=p_TYPE_CS_PK
where CSYSTEM_PK=p_CSYSTEM_PK;
 end updateCSystem;


and this is the code where i'm sending the parameters:

SQL
public void UpdateCSystem(float CSYSTEM_PK, float LOGIN_PK, string NAME, string REF_ELIPSOID, string PROJECTION, float TYPE_CS_PK)
    {
        using (OracleConnection objConn = new OracleConnection(konekcija))
        {
            OracleCommand objUpdateCmd = new OracleCommand();
            objUpdateCmd.Connection = objConn;
            objUpdateCmd.CommandText = "GTCSYSTEM.UPDATECSYSTEM";
            objUpdateCmd.CommandType = CommandType.StoredProcedure;
            objUpdateCmd.Parameters.Clear();
            objUpdateCmd.Parameters.Add("p_CSYSTEM_PK", OracleType.Float, 10,"CSYSTEM_PK");
            objUpdateCmd.Parameters.Add("p_LOGIN_PK", OracleType.Float, 10, "LOGIN_PK");
            objUpdateCmd.Parameters.Add("p_name", OracleType.VarChar, 9, "NAME");
            objUpdateCmd.Parameters.Add("p_REF_ELIPSOID", OracleType.VarChar, 9, "REF_ELIPSOID");
            objUpdateCmd.Parameters.Add("p_PROJECTION", OracleType.VarChar, 9, "PROJECTION");
            objUpdateCmd.Parameters.Add("p_TYPE_CS_PK", OracleType.Float, 7, "TYPE_CS_PK");

            try
            {
                objConn.Open();
                objUpdateCmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                System.Console.WriteLine("Exception: {0}", ex.ToString());
            }
            objConn.Close();
        }
    }


and this is the .NET code for the objectDataSource:

XML
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
                        SelectMethod="GetAllCSystem" UpdateMethod="UpdateCSystem" TypeName="Store">
                        <UpdateParameters>
                            <asp:Parameter Name="CSYSTEM_PK" Type="Single" />
                            <asp:Parameter Name="LOGIN_PK" Type="Single" />
                            <asp:Parameter Name="NAME" Type="String" />
                            <asp:Parameter Name="REF_ELIPSOID" Type="String" />
                            <asp:Parameter Name="PROJECTION" Type="String" />
                            <asp:Parameter Name="TYPE_CS_PK" Type="Single" />
                        </UpdateParameters>
                    </asp:ObjectDataSource>


I think this is better view :thumbsup:
Please help me with this problem !!!
 
Share this answer
 
Comments
LittleYellowBird 15-Jun-10 11:35am    
This is a better Question, perhaps you could narrow the problem down a little more then I suggest you post it as new question where people will see it in the 'Unanswered' section. :-)
The problem is when I'm trying to edit gridview I got this error message:

VB
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'UPDATECSYSTEM'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


This message is catched as exception in:

C#
try
{
    objConn.Open();
    objUpdateCmd.ExecuteNonQuery();
}
catch (Exception ex)
{
    System.Console.WriteLine(&quot;Exception: {0}&quot;, ex.ToString());
}



UPDATECSYSTEM is my PL/SQL procedure. I think that my problem is with parameters that I'm sending from the objectDataSource but I don't know what exactly is.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900