locked
Stored Procedure RRS feed

  • Question

  • User143067745 posted

    I was using OLEDB to communicate with database,Now I converted it to OracleClient. Now i am facing a proble in calling my stored procedures. In caliing to strored procedures it is giving following exception:

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

    I have checked all the procedure having same no of arguments. What is actual problem?? Please.

    Thanks a lot.

    Tuesday, May 1, 2012 4:07 AM

Answers

  • User143067745 posted

    I got it.

    I was using System.Data.OravleClien  which supports only upto version 9i of oracle database and compatible to only 1.1 .net framework.

    Now I downloaded Oracle.DataAcess.dll which supports all version of database and compatible with 4.0 .net framework.

    Thanks to all.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 1, 2012 8:03 AM

All replies

  • User1304301175 posted

    check this link this may help you out

    http://msdn.microsoft.com/en-us/library/yy6y35y8%28v=vs.71%29.aspx

    Tuesday, May 1, 2012 5:02 AM
  • User143067745 posted

    What's wrong with the code:

    oracle strored procedure:

    create or replace
    PROCEDURE IMAGE_INSERT_TEMP
    (
    Name_var In Varchar2
    ) AS
    BEGIN
    insert into photo1(photo1.name) values(name_var);
    commit;
    END IMAGE_INSERT_TEMP;

    my C# code to call the stored procedure:

    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Data.OracleClient;
    using System.IO;
    /// <summary>
    /// Summary description for NewBillEntry_OracleClient
    /// </summary>
    public class NewBillEntry_OracleClient
    {

       public string photoInsert(string name)
        {
            myconnection.ConnectionString = "Data Source=treasury;Persist Security Info=True;User ID=tttt;Password=kkkkk;Unicode=True";;
            using (myconnection)
            {
                myconnection.Open();
                mycommand.Connection = myconnection;           
                mycommand.CommandText = "Image_Insert_Temp";
                mycommand.CommandType = CommandType.StoredProcedure;
                mycommand.Parameters.Add("Name", OracleType.VarChar).Value = name;
                mycommand.ExecuteNonQuery();                  //Error point
                myconnection.Close();
                return "ok";
            }
        }

    }

    Button Click where am calling the above C# method:

    NewBillEntry_OracleClient obj = new NewBillEntry_OracleClient();

    name=txtName.text;
    obj.photoInsert(name);               
    Label1.Text = "Success";

    I am getting the following error(I am using VWD 2005 express Oracle Instantclient 11_1):

    System.Data.OracleClient.OracleException was unhandled by user code
      Message="ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'IMAGE_INSERT_TEMP'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"
      Source="System.Data.OracleClient"
      ErrorCode=-2146232008
      Code=6550
      StackTrace:
           at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
           at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
           at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor)
           at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
           at NewBillEntry_OracleClient.photoInsert(String name) in e:\E-KOSH\App_Code\Data Acess\NewBillEntry_OracleClient.cs:line 67
           at Pages_Temporary.Button1_Click(Object sender, EventArgs e) in e:\E-KOSH\Pages\Temporary.aspx.cs:line 34
           at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
           at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
           at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
           at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
           at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


    Please Help.

    Tuesday, May 1, 2012 5:48 AM
  • User143067745 posted

    I got it.

    I was using System.Data.OravleClien  which supports only upto version 9i of oracle database and compatible to only 1.1 .net framework.

    Now I downloaded Oracle.DataAcess.dll which supports all version of database and compatible with 4.0 .net framework.

    Thanks to all.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 1, 2012 8:03 AM