Plz help me in this stored procedure

Create a stored procedure called usp_OrderInsert. This stored procedure should accept all field values of the Orders table, including OrderID, as parameters. It should insert an order record into the Orders table.

It would be helpful if you post the table structure and other details.Anyways please see the below
create or replace procedure usp_OrderInsert(
p_OrderID orders.OrderID%TYPE,
IS
declaration-
begin
Insert into orders (order_id,....)
values(p_order_id,....);
commit;
exception
when others then
dbms_output.put_line(sqlerrm);
end;

Similar Messages

  • Help me in this stored procedure

    Create a stored procedure called usp_OrderInsert. This stored procedure should accept all field values of the Orders table, including OrderID, as parameters. It should insert an order record into the Orders table.

    You have the requirements to build the stored procedure, what have you got so far?
    Post your attempt and any errors or issues that you might be experiencing. Writing the whole procedure for you (without the table structure even) is going to be difficult.

  • Help me in calling stored procedure and getting results

    hi
    i have a SP like this
    CREATE OR REPLACE PACKAGE P1 AS
    TYPE g_con_ref_cursor is REF CURSOR ;
    TYPE g_con_error IS RECORD
      error_code NUMBER,
      error_desc varchar2(2000)
    PROCEDURE PROC_CURSOR
    (i_str_userid  IN VARCHAR2,
      o_cur_ref_cur OUT g_con_ref_cursor,
      o_rec_error   OUT g_con_error,
      o_num_status  OUT NUMBER);
    END;
    and i now i am trying to call this SP using my java program
    i am able to register the out put params for 2nd and 4 th variable
    my doubt is how i can register the output param for g_con_errorand how i can get result from this ????
    my java program is like this
    Connection connection = DatabaseHelper.prepareConnection();
    CallableStatement proc = connection.prepareCall("{ call P1.PROC_CURSOR(?, ?, ?, ?) }");
    proc.setString(1,"jn26557");
    proc.registerOutParameter(2,oracle.jdbc.driver.OracleTypes.CURSOR);
    proc.registerOutParameter(3,Types.STRUCT,); //HOW TO SET  THIS ?????
    proc.registerOutParameter(4,oracle.jdbc.driver.OracleTypes.NUMERIC);
    proc.execute();
    plz help me in this
    i have no idea how to do it
    any help would be appreciated
    Thanks in advance
    Jaya Prakash Nalajala

    You have the requirements to build the stored procedure, what have you got so far?
    Post your attempt and any errors or issues that you might be experiencing. Writing the whole procedure for you (without the table structure even) is going to be difficult.

  • Help with running a stored procedure

    Hi, could anybody help me with debugging this stored procedure:
    extraction_date in varchar2
    as
    begin
    execute immediate '
         declare
         /* Output file handler */
         fileHandler UTL_FILE.FILE_TYPE;
         asset_id VARCHAR2(60) := '''';
    cursor c_table is
         SELECT "ASSET ID"
         FROM REUT_MAIN_BOND
         WHERE MATURITY > TO_DATE(' || extraction_date || ', "MM-DD-YYYY");
         row c_table%ROWTYPE;
    begin
    fileHandler := UTL_FILE.FOPEN(''TEMP'', ''northfielddescupdate.in'', ''w'',32000);
         for row in c_table
         loop
         asset_id := row.ASSET;
         UTL_FILE.PUTF(fileHandler, ''asset_id'', ''\n'');
    end loop;
         UTL_FILE.FCLOSE(fileHandler);
    end;';
    commit;     
    end;
    when I run it - SQL> exec create_in_file('08102004')
    it gives me the following errors:
    ERROR at line 1:
    ORA-06550: line 8, column 11:
    PL/SQL: ORA-06553: PLS-103: Encountered the symbol "CALL" when expecting one of
    the following:
    <an identifier> <a double-quoted delimited-identifier>
    ORA-06553: PLS-112: end-of-line in quoted identifier
    ORA-06550: line 7, column 2:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 6, column 8:
    PLS-00341: declaration of cursor 'C_TABLE' is incomplete or malformed
    ORA-06550: line 10, column 5:
    PL/SQL: Item ignored
    ORA-06550: line 15, column 14:
    PLS-00364: loop index variable 'ROW' use is invalid
    ORA-06550: line 15, column 2:
    PL/SQL: Statement ignored
    ORA-06512: at "PETAR_NORTHFIELD.CREATE_IN_FILE", line 6
    ORA-06512: at line 1
    Thank you for your help

    Q #1 (and possibly the only question) - why are you using NDS for this?

  • What is the problem with this Stored Procedure

    Hi ,
    What is the problem with this Stored Procedure ?Why is it giving errors ??
    CREATE or replace  PROCEDURE getEmpName
    *(EMP_FIRST OUT VARCHAR2(255))*
    BEGIN
    SELECT ename INTO EMP_FIRST
    FROM Emp
    WHERE EMPNO = 7369;
    END ;
    */*

    You don't specify precision in procedure arguments.
    (EMP_FIRST OUT VARCHAR2(255))should be
    (EMP_FIRST OUT VARCHAR2)Since you asked what's wrong with it, I could add that it needs formatting and the inconsistent use of upper and lower case is not helping readability.

  • How to set pdn12.trancat mandatory in this stored procedure?

    How can i make PDN12.transcat in this Stored Procedure
    USE [zIRC DEMO]
    GO
    /****** Object:  StoredProcedure [dbo].[SP_CHECK_MANDATORY_IN_OPDN]    Script Date: 03/07/2014 10:37:54 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[SP_CHECK_MANDATORY_IN_OPDN]
      @list_of_cols_val_tab_del NVARCHAR(255), @error_message NVARCHAR(255) OUTPUT
    AS
    BEGIN
    --invoice type
      select
      @error_message='In header line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND isnull(OPDN.U_InvType,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND isnull(OPDN.U_InvType,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Invoice Type is missing'
    -- num at card
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In header line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(OPDN.NumAtCard,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(OPDN.NumAtCard,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Vendor ref. number is missing'
      END
    -- transporter
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(OPDN.U_Transport,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(OPDN.U_Transport,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Transporter is missing'
      END
    --dealer
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(OPDN.U_dealer,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(OPDN.U_Dealer,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Dealer is missing'
      END
    --base price
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S') AND isnull(PDN1.U_BasePrice,0)=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S') AND isnull(PDN1.U_BasePrice,0)=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Base Price is missing'
      END
    --taxcode
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(PDN1.TaxCode,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S','L') AND isnull(PDN1.TaxCode,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Taxcode is Missing'
      END
    -- ed rate
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S') AND isnull(PDN1.U_EDRate,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S') AND isnull(PDN1.U_EDRate,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Excice Duty Rate is missing'
      END
    -- ed duty
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S') AND isnull(PDN1.U_EDuty,0)=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('M','D','S') AND isnull(PDN1.U_EDuty,0)=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Excice Duty is missing'
      END
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND ISNULL(PDN1.U_MfgInvNo,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND ISNULL(PDN1.U_MfgInvNo,'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Mfg. invoice number is missing'
      END
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND isnull(convert(nvarchar(10),U_MfgInvDt,112),'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND isnull(convert(nvarchar(10),U_MfgInvDt,112),'')=''
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Mfg. invoice date is missing'
      END
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND PDN1.U_MfgQty=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND PDN1.U_MfgQty=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Mfg. invoice Quantity is missing'
      END
      if(ISNULL(@error_message,'')='')
      BEGIN
      select
      @error_message='In line number(s), '+ substring
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      where
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND PDN1.U_MfgValue=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ),1
      ,LEN((
      select CONVERT(char(2),PDN1.LineNum)+','
      from
      OPDN
      inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry
      WHERE
      OPDN.DocEntry=@list_of_cols_val_tab_del AND OPDN.DocType='I' AND OPDN.U_InvType in ('D','S') AND PDN1.U_MfgValue=0
      order by
      PDN1.LineNum FOR XML PATH ('')
      ))-1
      )+' Mfg. Assessble value is missing'
      END
      if(ISNULL(@error_message,'')<>'')
      BEGIN
      return -1
      END
      else
      begin
      return 0
      end
    END

    Hello Nabil
    Could you explain what is the point of making PDN12.Trancat mandatory? I am asking this because at my end that field has got NULL value in all PDN12 table entries, and I am not sure if this field can be updated manually when creating a Good Receipt PO. Considering this, it seems that by making this field mandatory TN will block all Good Receipts from addition.
    Regards

  • Query on FBL3N................Urgent  plz help me on this.

    Hi Friends
         Here is my query,
    I am changing the tcode FBL3N to add one extra field into it and to display data in the name1 field for the spcific entries in the selection screen,
    After selecting the All item radio button and giving the range in the select-options when i am pressing F8 it is giving me the correct output,after that when i am trying to display the name1 field by selecting the ctrl+f8 button and pressing the apply button  it is giving me the error as
    "An internal error has arisen in the form routine ANALYZE_ACT_FIELDCAT
    for program RFITEM_INC.
    This is due to inconsistencies between table T021S (special fields) and
    structure RFPOSEXT."
    I changed everything to Y* but still it is giving the error.
    Plz help me in this if someone face the same prob or someone having idea on this.
    Thanks a lot in Advance
    Mrutyun^

    Hi Mrutyunjaya,
    Did you manage to resolve this error?
    Thanks and Regards
    Pras

  • Plz help me on this very simple error

    hello everybody...i'm very new to java programming...i'm unable to execute my program though it has been compiled...my coding is something like this and is very easy>>
    class abc
    public static void main(String [] args)
    System.out.println("hello");
    and at the time of execution...this error is shown up>>
    C:\Documents and Settings\Ishan\Desktop>java abc
    Exception in thread "main" java.lang.NoClassDefFoundError: abc
    Caused by: java.lang.ClassNotFoundException: abc
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: abc. Program will exit.
    plz help me on this. thanks.

    Follow the instructions in this tutorial:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    See problem solutions here:
    http://java.sun.com/docs/books/tutorial/getStarted/problems/index.html

  • Looking for some help with using Oracle stored procedures in vb2010

    First off thank you to whoever lends me a hand with my problem. A little background first I am in a software development class and we are currently building our program using VB (I have no experience in this), and Oracle(currently in a Oracle class so I know how to use Oracle itself just not with VB).
    I am using vb2010 express edition if that helps. Currently I have a stored procedure that takes a 4char "ID" that returns a position (ie, salesperson,manager ect). I want to use the position returned to determine what vb form is displayed (this is acting as a login as you dont want a salesperson accessing the accountants page for payroll ect).
    Here is the code I have currently on the login page of my VB form
    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types
    Public Class Login
    Dim conn As New OracleConnection
    Private Sub empID_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles empID.Click
    End Sub
    Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
    conn.ConnectionString = "User ID = Auto" & _
    ";Password = ********" & _
    ";Data Source = XE"
    conn.Open()
    Dim sq1 As String = "Return_Position" 'name of procedure
    Dim cmd As New OracleCommand(sq1, conn)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Parameters.Add(New OracleParameter("I_EmpID", OracleDbType.Char, 4)).Value = Emp_ID.Text
    Dim dataReader As OracleDataReader = cmd.ExecuteReader
    dataReader.Read()
    Dim position As New ListBox
    position.Items.Add(dataReader.GetString(0)) 'were I am getting an error, I also tried using the dataReader.getstring(0) to store its value in a string but its a no go
    If position.FindStringExact("MANAGER") = "MANAGER" Then
    Me.Hide()
    Dim CallMenu As New Menu()
    CallMenu.ShowDialog()
    End If
    LoginBtn.Enabled = False
    End Sub
    I have read the oracle.net developer guide for using oracle in vb2010 and have successfully gotten through the document however they never use a stored procedure, since the teacher wants this program to user a layered architecture I cannot directly store sql queries like the document does, thus the reason I want to use stored procedures.
    This is getting frustrating getting stuck with this having no background in VB, I could easily do this in c++ using file i/o even through it would be a pain in the rear....

    Hello,
    I am calling Oracle 11g stored procedures from VB.Net 2010. Here is a code sample (based on your code) you should be able to successfully implement in your application.
    Please note that you may have to modify your stored procedure to include an OUT parameter (the employee position) if it doesn't have it yet.
    Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
    Dim sProcedureName As String = "Return_Position" 'name of stored procedure
    Dim ORConn as OracleConnection, sConn as String
    Dim sPosition as String, sDataSource as String, sSchema as String, sPWD as String
    Dim cmd As OracleCommand
    'please provide below sDataSource, sSchema and sPWD in order to connect to your Oracle DB
    sConn = "Data Source=" & sDataSource & ";User Id=" & sSchema & ";Password=" & sPWD & ";"
    ORConn = New OracleConnection(sConn)
    ORConn.Open()
    cmd = New OracleCommand(sProcedureName, ORConn)
    With cmd
    .CommandType = Data.CommandType.StoredProcedure
    'input parameter in your stored procedure is EmpId
    .Parameters.Add("EmpID", OracleDbType.Varchar2).Value = Emp_ID.Text
    .Parameters.Item("EmpID").Direction = ParameterDirection.Input
    'output parameter in your stored procedure is Emp_Position
    .Parameters.Add("Emp_Position", OracleDbType.Varchar2).Direction = ParameterDirection.Output
    .Parameters.Item("Emp_Position").Size = 50 'max number of characters for employee position
    Try
    .ExecuteNonQuery()
    Catch ex As Exception
    MsgBox(ex.Message)
    Exit sub
    End Try
    End With
    sPosition = cmd.Parameters.Item("Emp_Position").Value.ToString
    'close Oracle command
    If Not Cmd Is Nothing Then Cmd.Dispose()
    Cmd = Nothing
    'close Oracle connection
    If Not ORConn Is Nothing Then
    If not ORConn.State = 0 Then
    ORConn.Close()
    End If
    ORConn.Dispose()
    End If
    ORConn = Nothing
    If UCase(sPosition) = "MANAGER" Then
    Me.Hide()
    Dim CallMenu As New Menu()
    CallMenu.ShowDialog()
    End If
    LoginBtn.Enabled = False
    End Sub
    If you need further assistance with the code, please let me know.
    Regards,
    M. R.

  • Help required in a Stored Procedure

    I have a stored procedure as follows:
    create or replace
    PROCEDURE ACCOUNT_HISTORY_PROC_TEST (v_accountid IN VARCHAR2 DEFAULT NULL,
                                            v_enddate IN Date DEFAULT NULL,
                                            cv_1 IN OUT SYS_REFCURSOR,
                                            flag IN INTEGER,
                                            v_Error OUT NOCOPY NVARCHAR2
                                          ) AS
       DAY_1 varchar(4000);
       DAY_2 varchar(4000);
       DAY_3 varchar(4000);
       DAY_4 varchar(4000);
       DAY_5 varchar(4000);
       DAY_6 varchar(4000);
       days_Diff number default 0;
       currdate date;
    BEGIN --Stored Procedure Beginning
    /*If the Account History Table has the Account Id then the following will be executed*/
       IF flag = 0 THEN --1st IF
         Select CurrentDate,DAY2,DAY3,DAY4,DAY5,DAY6 into currdate,DAY_2,DAY_3,DAY_4,DAY_5,DAY_6 from ACCOUNT_STATS_TABLE where Account_id = v_AccountId;
    /*If the transaction is on the same day then the following will be executed*/
          IF currdate = v_endDate THEN --2nd IF
              OPEN cv_1 FOR
                    Select DEPOSIT_CNT,DEPOSIT_AMT,WITHDRAWAL_CNT,WITHDRAWAL_AMT,ATM_CREDIT_CNT,ATM_CREDIT_AMT,ATM_DEBIT_CNT,ATM_DEBIT_AMT,CASH_CREDIT_CNT,CASH_CREDIT_AMT,CASH_DEBIT_CNT,CASH_DEBIT_AMT,CLRNG_CREDIT_CNT,CLRNG_CREDIT_AMT,CLRNG_DEBIT_CNT,CLRNG_DEBIT_AMT,TRANSFER_CREDIT_CNT,TRANSFER_CREDIT_AMT,TRANSFER_DEBIT_CNT,TRANSFER_DEBIT_AMT,CUMMULATIVE_CNT,CUMMULATIVE_AMT,CASH_COUNT,CASH_AMOUNT,DAY1,DAY2,DAY3,DAY4,DAY5,DAY6,CDAY_DEPOSIT_COUNT,CDAY_DEPOSIT_AMOUNT,CDAY_WITHDRAWAL_COUNT,CDAY_WITHDRAWAL_AMOUNT,CDAY_ATM_CREDITTXN_COUNT,CDAY_ATM_CREDITTXN_AMOUNT,CDAY_ATM_DEBITTXN_COUNT,CDAY_ATM_DEBITTXN_AMOUNT,CDAY_CASH_CREDITTXN_COUNT,CDAY_CASH_CREDITTXN_AMOUNT,CDAY_CASH_DEBITTXN_COUNT,CDAY_CASH_DEBITTXN_AMOUNT,CDAY_CLEARING_CREDITTXN_COUNT,CDAY_CLEARING_CREDITTXN_AMOUNT,CDAY_CLEARING_DEBITTXN_COUNT,CDAY_CLEARING_DEBITTXN_AMOUNT,CDAY_TRANSFER_CREDITTXN_COUNT,CDAY_TRANSFER_CREDITTXN_AMOUNT,CDAY_TRANSFER_DEBITTXN_COUNT,CDAY_TRANSFER_DEBITTXN_AMOUNT,CDAY_CUMMULATIVETXN_COUNT,CDAY_CUMMULATIVETXN_AMOUNT,CDAY_CASH_TXN_COUNT,CDAY_CASH_TXN_AMOUNT,CURRENTDATE from ACCOUNT_STATS_TABLE where Account_id = v_AccountId;
    /*If the transaction is not on the same day then the DAY1,DAY2,DAY3,DAY4,DAY5,DAY6 columns will be shifted which will be done in the following part*/
          ELSE --2nd ELSE
            days_diff:=v_endDate-currdate;
            FOR i IN 1..days_diff LOOP
            DAY_1:=DAY_2;
            DAY_2:=DAY_3;
            DAY_3:=DAY_4;
            DAY_4:=DAY_5;
            DAY_5:=DAY_6;
            DAY_6:='0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0';
            END LOOP;
                      Update ACCOUNT_STATS_TABLE
                                set DAY1 = DAY_1,
                                    DAY2 = DAY_2,
                                    DAY3 = DAY_3,
                                    DAY4 = DAY_4,
                                    DAY5 = DAY_5,
                                    DAY6 = DAY_6,
                                    CDAY_DEPOSIT_COUNT=0,
                                    CDAY_DEPOSIT_AMOUNT=0,
                                    CDAY_WITHDRAWAL_COUNT=0,
                                    CDAY_WITHDRAWAL_AMOUNT=0,
                                    CDAY_ATM_CREDITTXN_COUNT=0,
                                    CDAY_ATM_CREDITTXN_AMOUNT=0,
                                    CDAY_ATM_DEBITTXN_COUNT=0,
                                    CDAY_ATM_DEBITTXN_AMOUNT=0,
                                    CDAY_CASH_CREDITTXN_COUNT=0,
                                    CDAY_CASH_CREDITTXN_AMOUNT=0,
                                    CDAY_CASH_DEBITTXN_COUNT=0,
                                    CDAY_CASH_DEBITTXN_AMOUNT=0,
                                    CDAY_CLEARING_CREDITTXN_COUNT=0,
                                    CDAY_CLEARING_CREDITTXN_AMOUNT=0,
                                    CDAY_CLEARING_DEBITTXN_COUNT=0,
                                    CDAY_CLEARING_DEBITTXN_AMOUNT=0,
                                    CDAY_TRANSFER_CREDITTXN_COUNT=0,
                                    CDAY_TRANSFER_CREDITTXN_AMOUNT=0,
                                    CDAY_TRANSFER_DEBITTXN_COUNT=0,
                                    CDAY_TRANSFER_DEBITTXN_AMOUNT=0,
                                    CDAY_CUMMULATIVETXN_COUNT=0,
                                    CDAY_CUMMULATIVETXN_AMOUNT=0,
                                    CDAY_CASH_TXN_COUNT=0,
                                    CDAY_CASH_TXN_AMOUNT=0,
                                    CurrentDate = v_enddate
                                    where Account_id = v_accountid;
          open cv_1 for
              Select DEPOSIT_CNT,DEPOSIT_AMT,WITHDRAWAL_CNT,WITHDRAWAL_AMT,ATM_CREDIT_CNT,ATM_CREDIT_AMT,ATM_DEBIT_CNT,ATM_DEBIT_AMT,CASH_CREDIT_CNT,CASH_CREDIT_AMT,CASH_DEBIT_CNT,CASH_DEBIT_AMT,CLRNG_CREDIT_CNT,CLRNG_CREDIT_AMT,CLRNG_DEBIT_CNT,CLRNG_DEBIT_AMT,TRANSFER_CREDIT_CNT,TRANSFER_CREDIT_AMT,TRANSFER_DEBIT_CNT,TRANSFER_DEBIT_AMT,CUMMULATIVE_CNT,CUMMULATIVE_AMT,CASH_COUNT,CASH_AMOUNT,DAY1,DAY2,DAY3,DAY4,DAY5,DAY6,CDAY_DEPOSIT_COUNT,CDAY_DEPOSIT_AMOUNT,CDAY_WITHDRAWAL_COUNT,CDAY_WITHDRAWAL_AMOUNT,CDAY_ATM_CREDITTXN_COUNT,CDAY_ATM_CREDITTXN_AMOUNT,CDAY_ATM_DEBITTXN_COUNT,CDAY_ATM_DEBITTXN_AMOUNT,CDAY_CASH_CREDITTXN_COUNT,CDAY_CASH_CREDITTXN_AMOUNT,CDAY_CASH_DEBITTXN_COUNT,CDAY_CASH_DEBITTXN_AMOUNT,CDAY_CLEARING_CREDITTXN_COUNT,CDAY_CLEARING_CREDITTXN_AMOUNT,CDAY_CLEARING_DEBITTXN_COUNT,CDAY_CLEARING_DEBITTXN_AMOUNT,CDAY_TRANSFER_CREDITTXN_COUNT,CDAY_TRANSFER_CREDITTXN_AMOUNT,CDAY_TRANSFER_DEBITTXN_COUNT,CDAY_TRANSFER_DEBITTXN_AMOUNT,CDAY_CUMMULATIVETXN_COUNT,CDAY_CUMMULATIVETXN_AMOUNT,CDAY_CASH_TXN_COUNT,CDAY_CASH_TXN_AMOUNT,CURRENTDATE from ACCOUNT_STATS_TABLE where Account_id = v_AccountId;
          END IF; --END 2nd IF
    /*If the Account History Table does not have Account Id then the following will be executed*/
    ELSE --1st ELSE
    /*If the transaction is in the middle of the month then the AH_PROC_REVISED Stored Procedure will be called*/     
              AH_PROC(v_accountid,v_enddate);
          open cv_1 for
          Select DEPOSIT_CNT,DEPOSIT_AMT,WITHDRAWAL_CNT,WITHDRAWAL_AMT,ATM_CREDIT_CNT,ATM_CREDIT_AMT,ATM_DEBIT_CNT,ATM_DEBIT_AMT,CASH_CREDIT_CNT,CASH_CREDIT_AMT,CASH_DEBIT_CNT,CASH_DEBIT_AMT,CLRNG_CREDIT_CNT,CLRNG_CREDIT_AMT,CLRNG_DEBIT_CNT,CLRNG_DEBIT_AMT,TRANSFER_CREDIT_CNT,TRANSFER_CREDIT_AMT,TRANSFER_DEBIT_CNT,TRANSFER_DEBIT_AMT,CUMMULATIVE_CNT,CUMMULATIVE_AMT,CASH_COUNT,CASH_AMOUNT,DAY1,DAY2,DAY3,DAY4,DAY5,DAY6,CDAY_DEPOSIT_COUNT,CDAY_DEPOSIT_AMOUNT,CDAY_WITHDRAWAL_COUNT,CDAY_WITHDRAWAL_AMOUNT,CDAY_ATM_CREDITTXN_COUNT,CDAY_ATM_CREDITTXN_AMOUNT,CDAY_ATM_DEBITTXN_COUNT,CDAY_ATM_DEBITTXN_AMOUNT,CDAY_CASH_CREDITTXN_COUNT,CDAY_CASH_CREDITTXN_AMOUNT,CDAY_CASH_DEBITTXN_COUNT,CDAY_CASH_DEBITTXN_AMOUNT,CDAY_CLEARING_CREDITTXN_COUNT,CDAY_CLEARING_CREDITTXN_AMOUNT,CDAY_CLEARING_DEBITTXN_COUNT,CDAY_CLEARING_DEBITTXN_AMOUNT,CDAY_TRANSFER_CREDITTXN_COUNT,CDAY_TRANSFER_CREDITTXN_AMOUNT,CDAY_TRANSFER_DEBITTXN_COUNT,CDAY_TRANSFER_DEBITTXN_AMOUNT,CDAY_CUMMULATIVETXN_COUNT,CDAY_CUMMULATIVETXN_AMOUNT,CDAY_CASH_TXN_COUNT,CDAY_CASH_TXN_AMOUNT,CURRENTDATE from ACCOUNT_STATS_TABLE where Account_id = v_AccountId;
    END IF; --END 1st IF
    EXCEPTION
       WHEN OTHERS THEN
      -- open cv_1 for Select DEPOSIT_CNT,DEPOSIT_AMT,WITHDRAWAL_CNT,WITHDRAWAL_AMT,ATM_CREDIT_CNT,ATM_CREDIT_AMT,ATM_DEBIT_CNT,ATM_DEBIT_AMT,CASH_CREDIT_CNT,CASH_CREDIT_AMT,CASH_DEBIT_CNT,CASH_DEBIT_AMT,CLRNG_CREDIT_CNT,CLRNG_CREDIT_AMT,CLRNG_DEBIT_CNT,CLRNG_DEBIT_AMT,TRANSFER_CREDIT_CNT,TRANSFER_CREDIT_AMT,TRANSFER_DEBIT_CNT,TRANSFER_DEBIT_AMT,CUMMULATIVE_CNT,CUMMULATIVE_AMT,CASH_COUNT,CASH_AMOUNT,DAY1,DAY2,DAY3,DAY4,DAY5,DAY6,CDAY_DEPOSIT_COUNT,CDAY_DEPOSIT_AMOUNT,CDAY_WITHDRAWAL_COUNT,CDAY_WITHDRAWAL_AMOUNT,CDAY_ATM_CREDITTXN_COUNT,CDAY_ATM_CREDITTXN_AMOUNT,CDAY_ATM_DEBITTXN_COUNT,CDAY_ATM_DEBITTXN_AMOUNT,CDAY_CASH_CREDITTXN_COUNT,CDAY_CASH_CREDITTXN_AMOUNT,CDAY_CASH_DEBITTXN_COUNT,CDAY_CASH_DEBITTXN_AMOUNT,CDAY_CLEARING_CREDITTXN_COUNT,CDAY_CLEARING_CREDITTXN_AMOUNT,CDAY_CLEARING_DEBITTXN_COUNT,CDAY_CLEARING_DEBITTXN_AMOUNT,CDAY_TRANSFER_CREDITTXN_COUNT,CDAY_TRANSFER_CREDITTXN_AMOUNT,CDAY_TRANSFER_DEBITTXN_COUNT,CDAY_TRANSFER_DEBITTXN_AMOUNT,CDAY_CUMMULATIVETXN_COUNT,CDAY_CUMMULATIVETXN_AMOUNT,CDAY_CASH_TXN_COUNT,CDAY_CASH_TXN_AMOUNT,CURRENTDATE from ACCOUNT_STATS_TABLE where Account_id = v_AccountId;
      v_Error := SQLERRM;
      --dbms_output.PUT_LINE('No data');
    END ; --Stored Procedure End hereI want to modify this a little..
    What i am doing right now is if flag = 0, then I am getting some values from the Account_Stats_Table and comapring if the current_datereturn from the table is same as the passed date..If same then, i return the cursor having the values for the passed accountid..There is two time querying of the table..
    I want to avoid querying the table twice..If current date and passed date both are same then, let it return the results of the opened cursor.. How can i do it.. How can i avoid issuing select queries twice.. Please help..

    You can try this:
    IF flag = 0 THEN --1st IF
    OPEN cv_1 FOR
    Select DEPOSIT_CNT,DEPOSIT_AMT,WITHDRAWAL_CNT,WITHDRAWAL_AMT,ATM_CREDIT_CNT,ATM_CREDIT_AMT,ATM_DEBIT_CNT,ATM_DEBIT_AMT,CASH_CREDIT_CNT,CASH_CREDIT_AMT,CASH_DEBIT_CNT,CASH_DEBIT_AMT,CLRNG_CREDIT_CNT,CLRNG_CREDIT_AMT,CLRNG_DEBIT_CNT,CLRNG_DEBIT_AMT,TRANSFER_CREDIT_CNT,TRANSFER_CREDIT_AMT,TRANSFER_DEBIT_CNT,TRANSFER_DEBIT_AMT,CUMMULATIVE_CNT,CUMMULATIVE_AMT,CASH_COUNT,CASH_AMOUNT,DAY1,DAY2,DAY3,DAY4,DAY5,DAY6,CDAY_DEPOSIT_COUNT,CDAY_DEPOSIT_AMOUNT,CDAY_WITHDRAWAL_COUNT,CDAY_WITHDRAWAL_AMOUNT,CDAY_ATM_CREDITTXN_COUNT,CDAY_ATM_CREDITTXN_AMOUNT,CDAY_ATM_DEBITTXN_COUNT,CDAY_ATM_DEBITTXN_AMOUNT,CDAY_CASH_CREDITTXN_COUNT,CDAY_CASH_CREDITTXN_AMOUNT,CDAY_CASH_DEBITTXN_COUNT,CDAY_CASH_DEBITTXN_AMOUNT,CDAY_CLEARING_CREDITTXN_COUNT,CDAY_CLEARING_CREDITTXN_AMOUNT,CDAY_CLEARING_DEBITTXN_COUNT,CDAY_CLEARING_DEBITTXN_AMOUNT,CDAY_TRANSFER_CREDITTXN_COUNT,CDAY_TRANSFER_CREDITTXN_AMOUNT,CDAY_TRANSFER_DEBITTXN_COUNT,CDAY_TRANSFER_DEBITTXN_AMOUNT,CDAY_CUMMULATIVETXN_COUNT,CDAY_CUMMULATIVETXN_AMOUNT,CDAY_CASH_TXN_COUNT,CDAY_CASH_TXN_AMOUNT,CURRENTDATE
    from
    ACCOUNT_STATS_TABLE
    where
    Account_id = v_AccountId AND CurrentDate = v_enddate;

  • Help required in JDBC Stored Procedure

    Hi All,
    i have a requirement where i need to update the Database table using Stored Procedure from PI.
    I have the receiver JDBC channel and have done the mapping.
    The stored procedure has inputs of type NUMBER, VARCHAR2,DATE. in the message mapping i tried passing the same values in the type field, it throwed an error like UnSuppoted Format. Then i changed the type to integer for NUMBER and String for Varchar2 then also it is throwing an error like
    +java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PUT_XXXXX' ORA-06550: line 1, column 7: PL/SQL: Statement ignored +
    Can any please help with what type i need to send from PI to Stored procedure?
    Also, there two out type fileds defined in the Stored procedure..which i didnt create in my PI structure. Do we need to create that fileds in our structure?
    Please help me.
    Thanks,
    Hemanth.

    Hi Hemanth Kumar,
    I understand that you want to execute a stored procedure using JDBC receiver channel and looking at error message, you think there is an issue with type defined in Data Type.
    Now you need to debug step by step.
    Step 1:- In Interface Mapping Determination, do not refer to Operational Mapping (delete only OM from there, not the receiver Message Interface). By doing so, you are not call the OM (which refer to Graphical Mapping (MM refer to Data Type (which you think is wrong)). Note: As there is no OM, we need to send the exact payload required by receiver JDBC from Runtime Work Bench, for testing purpose.
    Step 2:- In receiver JDBC channel, change u2018Message Protocolu2019 from u201CXML SQL Formatu201D to u201CNative SQL Stringu201D. By doing this, you can do testing very fast; receiver JDBC channel will take only String. And we need to send the exact String which is needed by JDBC Stored Procedure. [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm]
    Step 3:- Now from RWB test the scenario. Payload should like this, please take help of Data base team to find the String which needs to send.
    EXECUTE PUT_uspAddress @City = 'New York'
    OR If you have access to the database, logon to it directly and try running the Stored Procedure.
    Step 4:- Now, you should have the string which executes the Stored Procedure correctly to go ahead. Your job is 60% done.
    Step 5:- Now, in receiver JDBC channel, change u2018Message Protocolu2019 from u201CNative SQL Stringu201D to u201CXML SQL Formatu201D. So that receiver JDBC channel will take only XML.
    Step 6:- So now, you have to construct equalant XML structure to String you got in Step 4.
    It may look like this [Link2|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7b72b2fde93673e10000000a114a6b/frameset.htm]
    <StatementName>
        <storedProcedureName action=u201D EXECUTEu201D>
           <table> PUT_uspAddress </table>
            < City [isInput=u201Dtrueu201D] type=SQLDatatype>val1</ City>
        </storedProcedureName >
      </StatementName>
    Step 7:- Now use the XML you have constructed in Step 6, to test the scenario from RWB. Try to correct if you come up with some errors. Your job is 90% done.
    Step 8:- Now, in Interface Mapping Determination refer back the Operational Mapping again, which contain the Message Mapping. Make sure that Message Mapping give the XML output same as XML you have developed in Step 6.
    FYI. 1. Whatever youu2019re sending, it will be converted to JDBC statement and will be executed on the database. logSQLStatement(JDBC Additional parameters sapnote_0000801367) will be show in logging not in payload.
    2. Most of the cases, type defined in Data Type has no control of what we can send in that element (except Date type). Let say, you can define an element u2018Ageu2019 as u2018numberu2019, but you can always send u201Casdfasdfu201D as input in Message Mapping.
    Regards,
    Raghu_Vamsee

  • Reg: Need help to call a Stored Procedure - Out Parameter using DBAdapter

    HI
    I have created a procedure with Out Parameter, using DBAdapater i have invoked it. I have assigned the out parameter also. But while running i am getting this error.
    My Procedure is shown below. It executes successfully when its run in database.
    create or replace
    PROCEDURE SP_QUERY(s_string in varchar2, retCodeString out varchar2)
    AS
    l_sql_stmt varchar2(1000);
    BEGIN
    l_sql_stmt := s_string;
    EXECute immediate l_sql_stmt;
    commit;
    if SQLCODE = 0 then
    retCodeString := 'OK';
    end if;
    END;
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException:
    Client received SOAP Fault from server : Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'ExecuteScript' failed due to:
    Stored procedure invocation error. Error while trying to prepare and execute the SOADEMO.SP_QUERY API.
    An error occurred while preparing and executing the SOADEMO.SP_QUERY API.
    Cause: java.sql.SQLException: ORA-06550: line 1, column 15:
    PLS-00904: insufficient privilege to access object SOADEMO.SP_QUERY ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
    This exception is considered not retriable, likely due to a modelling mistake.
    To classify it as retriable instead add property nonRetriableErrorCodes with value "-6550" to your deployment descriptor (i.e. weblogic-ra.xml).
    To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.
    All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:808) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:384)
    Please help me in this issue.

    Hi
    Right now i geeting the below error
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : oracle.fabric.common.FabricException:
    oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist :
    java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
    at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:808) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:384)
    at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.
    invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.
    invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.
    run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.
    UIXInclude.broadcast(UIXInclude.java:102) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.
    fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.
    broadcast(UIXInclude.java:96) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.
    processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889) at
    oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.
    execute(LifecycleImpl.java:194) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.
    StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.
    invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : oracle.fabric.common.FabricException: oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist : java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:362) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:1004) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:750) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:802) ... 79 more Caused by: oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : oracle.fabric.common.FabricException: oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist : java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException(DispatchImpl.java:1040) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:826) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:358) ... 82 more

  • Please help - Can not use stored procedure with CTE and temp table in OLEDB source

    Hi,
       I am going to create a simple package. It has OLEDB source , a Derived transformation and a OLEDB Target database.
    Now, for the OLEDB Source, I have a stored procedure with CTE and there are many temp tables inside it. When I give like EXEC <Procedure name> then I am getting the error like ''The metadata  could not be determined because statement with CTE.......uses
    temp table. 
    Please help me how to resolve this ?

    you write to the temp tables that get created at the time the procedure runs I guess
    Instead do it a staged approach, run Execute SQL to populate them, then pull the data using the source.
    You must set retainsameconnection to TRUE to be able to use the temp tables
    Arthur My Blog

  • Plz help me with this data insertion code

    Hi,
    I am listing a code below ,I am able to insert only one row of value.
    Then i get SQLException.General Exception and a Lock record MSAccess file is generated where .mdb file is stored.
    public void throwtodatabase()
    String gameid;
    ResultSet rs=null;
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con;
    con=DriverManager.getConnection ("jdbc:odbc:MyData","","");
    Statement stat3=con.createStatement();
    rs=stat3.executeQuery("select * from sudoko");
    while (rs.next()) {
    pctr=pctr+1;
    stat3.close();
    con.close();
    catch(Exception g)
    JFrame ob2=new JFrame();
    JOptionPane.showMessageDialog(ob2,g.toString(), "Message", JOptionPane.INFORMATION_MESSAGE);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con;
    con=DriverManager.getConnection ("jdbc:odbc:MyData","","");
    gameid="G00"+String.valueOf(pctr);
    PreparedStatement stat=null;
    for (int t1=1;t1<=9;t1++) {
    for (int t2=1;t2<=9;t2++) {
    stat=con.prepareStatement("Insert into Sudoko(gameid,row,col,val) values(?,?,?,?)");
    stat.setString(1,gameid);
    stat.setString(2,String.valueOf(t1));
    stat.setString(3,String.valueOf(t2));
    stat.setString(4,String.valueOf(array_map[t1][t2]));
    stat.execute();
    con.close();
    catch(Exception xd)
    JFrame ob2=new JFrame();
    JOptionPane.showMessageDialog(ob2,xd.toString(), "Message", JOptionPane.INFORMATION_MESSAGE);
    }Plz help.Thanx in advance.

    Have this stacktrace
    java.sql.SQLException: General error
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(Unknown Source)
    at Sudoko.throwtodatabase(Sudoko.java:1120)
    at Sudoko.generate_random_boards(Sudoko.java:1064)
    at Sudoko.actionPerformed(Sudoko.java:205)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
    n Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
    ce)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

  • Is their anything wrong with this stored procedure?

    CREATE PROCEDURE [dbo].[DeleteAllUserReferences]
    @UserName NVARCHAR(256),
    @Id NVARCHAR(128),
    @Role NVARCHAR(256),
    @RowsAffected int OUTPUT
    AS
    BEGIN TRY
    /*Declare @RowsAffected int;*/
    EXEC aspnet_UsersInRoles_RemoveUsersFromRoles "mainwebsite",@UserName,@Role
    EXEC aspnet_Users_DeleteUser "mainwebsite",@UserName,15,@RowsAffected
    DELETE FROM [AspNetUserRoles] WHERE UserId = @Id
    DELETE FROM [AspNetUsers] WHERE UserName = @UserName
    COMMIT TRANSACTION
    END TRY
    BEGIN CATCH
    ROLLBACK TRANSACTION
    END CATCH
    RETURN 0
    I have a stored procedure above which executes fine when I execute it manually but does not when I execute it via asp.net. Only the first statement executes and the rest does not. Is their anything that might not be proper SQL in this code causing it to stop
    functioning properly?
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr

    Since I don't know anything about the contents in that procedure I cannot comment on it. But if an error occurred, you would be taken the CATCH block and the error would be reraised.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Here's the code you requested:
    CREATE PROCEDURE [dbo].aspnet_Users_DeleteUser
    @ApplicationName nvarchar(256),
    @UserName nvarchar(256),
    @TablesToDeleteFrom int,
    @NumTablesDeletedFrom int OUTPUT
    AS
    BEGIN
    DECLARE @UserId uniqueidentifier
    SELECT @UserId = NULL
    SELECT @NumTablesDeletedFrom = 0
    DECLARE @TranStarted bit
    SET @TranStarted = 0
    IF( @@TRANCOUNT = 0 )
    BEGIN
    BEGIN TRANSACTION
    SET @TranStarted = 1
    END
    ELSE
    SET @TranStarted = 0
    DECLARE @ErrorCode int
    DECLARE @RowCount int
    SET @ErrorCode = 0
    SET @RowCount = 0
    SELECT @UserId = u.UserId
    FROM dbo.aspnet_Users u, dbo.aspnet_Applications a
    WHERE u.LoweredUserName = LOWER(@UserName)
    AND u.ApplicationId = a.ApplicationId
    AND LOWER(@ApplicationName) = a.LoweredApplicationName
    IF (@UserId IS NULL)
    BEGIN
    GOTO Cleanup
    END
    -- Delete from Membership table if (@TablesToDeleteFrom & 1) is set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V'))))
    BEGIN
    DELETE FROM dbo.aspnet_Membership WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_UsersInRoles table if (@TablesToDeleteFrom & 2) is set
    IF ((@TablesToDeleteFrom & 2) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_UsersInRoles') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_Profile table if (@TablesToDeleteFrom & 4) is set
    IF ((@TablesToDeleteFrom & 4) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_Profile WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_PersonalizationPerUser table if (@TablesToDeleteFrom & 8) is set
    IF ((@TablesToDeleteFrom & 8) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_Users table if (@TablesToDeleteFrom & 1,2,4 & 8) are all set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
    (@TablesToDeleteFrom & 2) <> 0 AND
    (@TablesToDeleteFrom & 4) <> 0 AND
    (@TablesToDeleteFrom & 8) <> 0 AND
    (EXISTS (SELECT UserId FROM dbo.aspnet_Users WHERE @UserId = UserId)))
    BEGIN
    DELETE FROM dbo.aspnet_Users WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    IF( @TranStarted = 1 )
    BEGIN
    SET @TranStarted = 0
    COMMIT TRANSACTION
    END
    RETURN 0
    Cleanup:
    SET @NumTablesDeletedFrom = 0
    IF( @TranStarted = 1 )
    BEGIN
    SET @TranStarted = 0
    ROLLBACK TRANSACTION
    END
    RETURN @ErrorCode
    END
    Sorry, about the delay. If you think this helps then I will finally be able to finish my stored procedure and move on.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to
    suffering - Yoda. Blog - http://www.computerprofessions.co.nr

Maybe you are looking for

  • Do a new layout on SAP NetWeaver Portal need more Performance?

    Hello, we want to create a new layout on SAP NetWeaver Portal in the Corporate Design of our company. Somebody said me, that a change from the standard layout needs a lot of more Performance on the server. Is that true? At the present time our server

  • Acrobat Updater

    Hi. I have installed both Acrobat Pro 9 and Acrobat XI on my MacBook Pro (OSX 10.9.4), but continue to get an Acrobat Updater pop up asking if I want to update to 8.3.1. How to I get rid of this updater? Thanks.

  • Collecting Web visits or Browsing History

    Hi,  I did a quick search and couldn't find this topic. If its already answered, appreciate your help to the link.  So essentially, we want to upgrade all OS clients to IE 11, we have a mix of all versions (8-11) currently and have 10K machines to de

  • PL/SLQ - How to create query with horizontal running totals

    Hi: I'm trying to create a report in the following format Year Name Reg1 Reg2 Reg3 2001 Al 3 4 5 2001 Le 4 1 1 2001 7 5 6 2002 Sue 2 4 1 2002 Al 1 3 6 2002 Jim 6 1 3 2002 16 15 16 2003 Jim 4 -3 2 2003 Le -2 4 5 2003 20 16 23 Note that the totals are

  • Incompatible application error

    need help for an irritating problem. i recently downloaded cs6 cretive suite from my universities software licensing aggreement with adobe and when i go to install it on my lap top, after anywhere from 30 seconds to 30 min(after my comp ran a trouble