Oracle Parameters

Oracle Parameters

Forum member · Jul 16, 2007
I'm in the DynamicPDF Designer attempting to load data from an Oracle 10g database. The stored proc I'm calling receives 1 (one) input parameter (userID) but returns several refCursors. Our app is asp.net 1.1 Question: In the Query Editor: Stored Procedure.... Do I need to add the Parameter Name for each refCursor being returned OR just add the Parameter Name for the userID? If I need to add the refCursor, what 'type' do I choose? refCursor is not a choice.

Re: Oracle Parameters

Support · Jul 16, 2007
Hello, You will only have to add the Parameter name for the userID for the stored procedure in the Query Editor window. Thanks, ceTe Software Support Team

Re: Oracle Parameters

Forum member · Jul 17, 2007
In the Query Editor - Stored Procedure Parameter Name: p_cus_id Type: int32 Length: 7 Precision: 0 Scale: 0 Nullable: unchecked Direction: Input Value: 92688 From within my aspx page load, I call DrawPdfToWeb("ProfilePreview.pdf") and I get ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GetProfileViewByID' ORA-06550: line 1, column 7: PL/SQL: Statement ignored I know that the error indicates I have misspelled an argument or do not have the correct number of arguments or an argument type is incorrect My Sproc is looking for the following: p_cus_id IN NUMBER, pcur_cus OUT sys_refcursor, pcur_applicant OUT sys_refcursor, pcur_address OUT sys_refcursor, pcur_phone OUT sys_refcursor ========================================================== The parm I'm passing is p_cus_id with a value of 92688 Thanks...

Re: Oracle Parameters

Support · Jul 17, 2007
Hello, Currently you will not be able to use this oracle stored procedure that has OUT parameter data type as sys_refcursor from the DynamicPDF Designer. However you can do this from the code by making call to the stored procedure within the Query_OpeningRecordSet event handler that reads the value as an OracleDataReader after executing the stored procedure. Thanks, ceTe Software Support Team

Re: Oracle Parameters

Forum member · Oct 5, 2007
So how do you do it then? If you can't execute the stored procedure how can it raise the event? Oracle stored procedures that return a dataset (refcursor) are not supported at all?

Re: Oracle Parameters

Support · Oct 8, 2007
Hello, You have to select Event Driven from the Provider Type drop down list in your DPLX file. Then using the Query_OpeningRecordSet event off the Query object, you can execute oracle stored procedures that return ref cursors. You can find sample example in our Help Documentation that shows use of Event Driven Queries . Following is the sample C# code that shows how to use Oracle stored procedures within events: private void Query_OpeningRecordSet( object sender, OpeningRecordSetEventArgs e ) { OracleConnection conn = new OracleConnection("Data Source=DB1;User Id=test;Password=test;"); conn.Open(); OracleCommand cmd = new OracleCommand(); cmd.Connection = conn; cmd.CommandText = "TestPackage.Test"; cmd.CommandType = CommandType.StoredProcedure; OracleParameter param = cmd.Parameters.Add("results_cursor", OracleType.Cursor); param.Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); OracleDataReader dr = (OracleDataReader)param.Value; while(dr.Read()) { for(int i = 0; i < dr.FieldCount; i++) Console.WriteLine(dr[i].ToString() + ";"); } } We will be adding the feature to use oracle stored procedures directly from the DPLX file in v5.0 of our product. Thanks, ceTe Software Support Team

Re: Oracle Parameters

Forum member · Oct 9, 2007
When is version 5 coming out?

Re: Oracle Parameters

Support · Oct 9, 2007
Hello, Currently we do not any fixed release dates for v5.0. It will likely be within the next 3-6 months. If you would like to participate in beta testing, can you please send an email to our [^a|mailto:support@cete.com|Support Team^] to be added to the list of beta testers. Thanks, ceTe Software Support Team