Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8618211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:03:14+00:00 2026-06-12T06:03:14+00:00

Here is my procedure and it works through PL/SQL Developer: create or replace procedure

  • 0

Here is my procedure and it works through PL/SQL Developer:

create or replace procedure CHECK_INFO_INS
(
    p_id_aircraft IN VARCHAR2,           
    p_id_check_type IN NUMBER,     
    p_last_check   IN DATE,             
    p_next_check   IN DATE,             
    p_expectedcost IN NUMBER,                             
    p_id_currency  IN NUMBER,
    p_currency_rate IN NUMBER                         
)             
is
Rate number;
CurrentDate Date;
catID Checkcategories.Id%type;
begin
select C.ID into catID from CHECKCATEGORIES C WHERE C.NAME='C' and C.CHECKTYPEID = p_id_check_type;

  Rate:=round(p_expectedcost/MONTHS_BETWEEN(p_next_check, p_last_check),3)*p_currency_rate;
  CurrentDate := SYSDATE;
  INSERT INTO CHECK_INFO
  (
      id_check_info,            
      id_aircraft,              
      id_check_categories,      
      last_check,               
      next_check,              
      expectedcost,             
      is_accumulation_complited,
      rate,                     
      id_currency,              
      current_date,             
      monthes_between,
      CURENCY_RATE             
 )
  values
  (
    CHECKS_INFO_SEQ.NEXTVAL,
    p_id_aircraft,
    catID,
    p_last_check,
    p_next_check,
    p_expectedcost,
    0,
    Rate,
    p_id_currency,
    CurrentDate,
    round(MONTHS_BETWEEN(p_next_check, p_last_check),1),
    p_currency_rate
  );
  commit;
    EXCEPTION
    WHEN OTHERS
    THEN
      DBMS_OUTPUT.PUT_LINE(SQLERRM);
      ROLLBACK;
end CHECK_INFO_INS;

Here is my C# code:

        decimal expectedCost = Decimal.Parse(ExpCostTextBox.Text);
        DateTime lastCheck = DateTime.Parse(LastCheckdateTimePicker.Text);
        DateTime nextCheck = DateTime.Parse(NextCheckdateTimePicker.Text);
        int checkType = int.Parse(ChCmbx.SelectedValue.ToString());
        string AirCraft = AirCraftCmbx.SelectedValue.ToString();
        int curID = int.Parse(CurrComboBox.SelectedValue.ToString());
        decimal curRate = decimal.Parse(CurRateTextBox.Text.Replace('.',','));


        con = new OracleConnection(conStr);
        con.Open();
        cmd = con.CreateCommand();
        cmd.BindByName = true;
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = schema_name + ".CHECK_INFO_INS";

        cmd.Parameters.Add("p_id_aircraft", OracleDbType.NVarchar2, AirCraft, ParameterDirection.Input);
        cmd.Parameters.Add("p_id_check_categories", OracleDbType.Int32, checkType, ParameterDirection.Input);
        cmd.Parameters.Add("lastCheck", OracleDbType.Date, lastCheck, ParameterDirection.Input);
        cmd.Parameters.Add("nextCheck", OracleDbType.Date, nextCheck, ParameterDirection.Input);
        cmd.Parameters.Add("p_expectedcost", OracleDbType.Decimal, expectedCost, ParameterDirection.Input);
        cmd.Parameters.Add("p_id_currency", OracleDbType.Int32, curID, ParameterDirection.Input);
        cmd.Parameters.Add("p_currency_rate", OracleDbType.Decimal, curRate, ParameterDirection.Input);
        cmd.ExecuteNonQuery();

It throws an exception on the executeNonQuery line:

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

I tried to recreate the procedure, but it didn’t work. What is wrong with my C# code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:03:15+00:00Added an answer on June 12, 2026 at 6:03 am

    I’m not very familiar with Oracle, but the second parameter in your procedure is named “p_id_check_type” whereas when you add the parameter to the parameters collection, you use the name “p_id_check_categories”. Might that be your problem?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a procedure in T-SQL from here which works perfectly when I execute
Here's my code I'm trying to get working to no avail: CREATE DEFINER=`auser`@`localhost` PROCEDURE
I am writing a stored procedure in SQL Server 2008. Here I have a
I'm after a simple stored procedure to drop tables. Here's my first attempt: CREATE
Here is how the export works .NET DataTable is created by a SQL Query
When I try to install redmine by following the procedure here: http://www.redmine.org/projects/redmine/wiki/RedmineInstall At step
here's the stored procedure i wrote.In this proc p_subjectid is an array of numbers
Here is a lisp procedure that simply adds 'a' to the absolute value of
I asked the question here and now i would like to reverse this procedure
I want to get the out parameter of stored procedure using Zend framework Here's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.