0

I am using Asp.Net Maker to generate my application. I am connected to an Oracle database, I do not need to open Oracle connection again in my code because it's already generated by Asp.Net Maker Tool.

I am trying to execute an Oracle stored procedure from my C# app. I want to send ReadingDate parameter from my code to the procedure RIO_reading_data -

This is my application code

public void Row_Inserted(OrderedDictionary rsold, OrderedDictionary rsnew) 
{
    //ew_Write("Row Inserted");
    // ghalib here
    string  theMONTH = rsnew["MONTH"].ToString();
    string theYEAR= rsnew["YEAR"].ToString();
    String ReadingDate = theYEAR + theMONTH;

    // I try this code but did not work 
    System.Data.OracleClient.OracleCommand comando = new System.Data.OracleClient.OracleCommand("RIO_reading_data", Connection);
}

My procedure

CREATE OR REPLACE PROCEDURE RIO_reading_data (v_pstyymmm number) IS
  tmpVar NUMBER;     
BEGIN
  delete pen_temp;
  commit;

  insert into pen_temp  
   select  
    EMPNO,     
    CSRNO,                 
    EMPGRP,          
    EMPGRD,                
    BASICSL_ORGN,          
    from  EMp_READING
   where ppstyymm=v_pstyymmm;
  commit;

END RIO_reading_data;
/
J. Chomel
  • 8,193
  • 15
  • 41
  • 69
ghalib
  • 203
  • 1
  • 2
  • 9
  • Please tell us in which way this is not doing what you wanted to achieve - do you get errors or results different from what you expected? – Hulk Aug 02 '16 at 04:55
  • as i mentioned brother i do not know how to do this ! – ghalib Aug 02 '16 at 04:57

0 Answers0