How to use OracleDbType.Array provided by ODP with User defined type ?
Can anyone help me how to use OracleDbType.Array provided by ODP.NET ?
I need to pass string array to a oracle stored procedure .
User defined array type defined in oracle is :
CREATE TYPE TYPE_NAME IS TABLE OF varchar2(20) ;
This type is defined outside of any package , and i have tested that if definition of type is modified to
CREATE TYPE TYPE_NAME IS TABLE OF varchar2(20) index by binary_integer , i am able to pass array as AssociativeArray to my Stored Procedure.
But how to pass array object if the Type's definition does not contain index by clause ?
Please help how to pass Array object to Oracle Stored Procedure ?
The solution described in Passing Array of UDT or Collection as IN OUT using OracleDbType.InputOutput
is working for me.
Edited by: stzueger on Jan 2, 2012 10:32 AM
Similar Messages
-
How to use FileVault on second internal drive with user-folder?!
Hi there,
I've a problem that has not solved yet.
My MBP early 2011 with OS X Lion 10.7.5 has instead the SuperDrive two internal harddiskdrives:
The "System"-Drive (128 GB SSD) for nothing else than the MacOSX installation/applications, and the "User"-Drive (500 GB classic HDD) for all my data and my user-folder. (Yes, I moved it via Terminal commands from "System" to "User").
All works fine, but I am only allowed to encrypt the "System"-Drive via FileVault2. The "User"-Drive is not supported by FileVault2.
I tried to encrypt it with the Terminal commands:
diskutil cs convert /Volumes/WD-Blue -passphrase
(Note: "WD-Blue" is the name of the "User"-Drive)
After confirming the new passphrase, it should be encrypting my "User"-Drive. In the HardDiskDrive-Utility is this hdd converted into a "Mac OS Extended (Journaled, encrypted)". So far, so good
But, now the big problem:
After rebooting the MBP, it is not possible to login.
"An error has occured with this user" (or similar)
I have to reboot, hold CMD+R, and deselect in the HDD-Utility the HDD-Protection, and decrypt this drive with the known passphrase.
After this "correction", all works fine, but without the encryption...
So... any ideas, how to protect the second hdd with my user-folder, without losing my data, because I think, when the second one has been deleted and the new format is "Mac OS Extended (Journaled, encrypted)", it won't solve my problem, because my user-folder is not on the "System"-Drive.
Thank you, and sorry for my english
Regards.Hi there,
I solved my problem by inform myself...
Here is the solution to encrypt the second internal drive, without losing data, if your user-folder is on the second one (and not on SYSTEM). I will type "WD-Blue" in this example. You have to type in your drivename, that you want to encrypt.
Please note, that modifying your system this way is at your own risk!
Add new user in the ucp with admin-permissions
logout your user
login as new user (admin)
be sure, that no file on the second drive is in use
open terminal
type diskutil list to see your drives
type diskutil cs convert /Volumes/WD-Blue -passphrase YOURPASSWORD
Terminal should encrypt your drive. To check the status type diskutil cs list
If the amount of bytes the same, the drive has been encrypted
So, now still use terminal and type (after encryption has been accomplished):
curl https://raw.github.com/jridgewell/Unlock/master/install.sh | bash
Follow the promts and enter your given password for the encrypted drive (i.e. for "WD-Blue")
Exit terminal and reboot
Done
This way works fine. My user-folder is still on WD-Blue (2nd Drive) and the hdd is encrypted without losing my files.
Regards,
Marc.
List of references:
Encryption without formatting:
http://www.macworld.com/article/1162999/complete_guide_to_filevault_2_in_lion.ht ml?page=2
Mount second encrypted drive while boot-sequence:
https://github.com/jridgewell/Unlock
Please note, that modifying your system this way is at your own risk! -
How to use the same POWL query for multiple users
Hello,
I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
"Query 'ABC' is already open in another session."
where 'ABC' is the query name.
Can you please tell me how to use the same POWL query for multiple users ?
A fast reply would be highly appreciated.
Thanks and Regards,
SandhyaBatch processing usually involves using actions you have recorded. In Action you can insert Path that can be used during processing documents. Path have some size so you may want to only process document that have the same size. Look in the Actions Palette fly-out menu for insert path. It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..
-
How to Use SQL Query having IN Clause With DB Adapter
Hi,
I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
Thanksinvoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter
-
Req any examples of how to use a USB midi controller​/keyboards with Labview TIA
Req any examples of how to use a USB midi controller/keyboards with Labview TIA
Hi,
To access the MIDI ports you will need to call the Windows SDK. To send MIDI commands is relatively easy, here is an example that shows you how to send data to a MIDI controller or keyboard.
As far as input goes, this is the hard part. There are a series of functions that you need to call to open up the device, set some buffers and and possibly a callback to get notifications on the incoming data.
Reading MIDI data will not be an easy task, your best bet will be to implement this in a DLL and call that DLL in LabVIEW, there should be some code available o the web.
= "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_multimedia_... is a link to the Windows multimedia functions that you could use for MIDI input.
Let me know if you have any further questions.
Regards,
Juan Carlos
N.I. -
How to use 45W MagSafe 2 Power Adapter with cable management MagSafe 2 power port macbook air 2013
How to use 45W MagSafe 2 Power Adapter with cable management MagSafe 2 power port macbook air 2013 there's two plugs do I use both for the safety to work or I just one ? Thanks sorry new macbook air 2013 was given to my daughter fir her 18th bday 2 days ago by my brother
No, the one is just an extension cord, just use the 45W charger with its attached thin cord and connect the magnetic magsafe to to the connector on the back left of the macbook Air for use and charging it
-
In SQLScript, how to use EXEC to call another procedure with parameters in procedure?
Hi experts,
In SQLScript, How to use EXEC to call another procedure with input and output parameters in procedure?thanks very muchHi Sagar,
thank you! I generate another procedure with an input parameter and an output parameter in a procedure. Then i need to call the generated procedure using EXEC. Here is my code:
create procedure ftest1(out sum_num bigint)
as
begin
declare fa_output bigint;
declare v_sql_drop varchar(200);
declare v_sql varchar(500);
declare cursor c_cursor1 for select num from TABLE1;
--v_sql_drop := 'drop procedure fe';
--exec v_sql_drop;
v_sql := 'create procedure fe(in i_num bigint,out o_num bigint) as begin';
v_sql := :v_sql || ' o_num := :i_num * 2 + :i_num * :i_num;';
v_sql := :v_sql || ' end';
exec v_sql;
open c_cursor1;
for c_item as c_cursor1 do
exec 'call fe(c_item.num,o_num=>fa_output)';
if sum_num is null then
sum_num := fa_output;
else
sum_num := :sum_num + fa_output;
end if;
end for;
close c_cursor1;
end;
The underline code is using exec to call the generated procedure. But this method cannot work. Any suggestion? thanks again! -
How to use Mac Mini Server as NAT with only one port??
How to use Mac Mini Server as NAT with only one ethernet port??
But why did apple sell me this server that does NAT with one port? I don't get it.
-
How to convert Collection to user defined type in db
Hello All,
I am using Apex 4.1.0.00.32 and Oracle 11g.
I have page process to store the user selected rows (keys) in a collection as follows:
declare
temp varchar2(4000);
vrow number;
begin
apex_collection.CREATE_OR_TRUNCATE_COLLECTION('SELECTED_PERSONS');
IF (apex_application.g_f32.COUNT > 0) THEN
FOR ii IN 1 .. htmldb_application.g_f32.COUNT
LOOP
vrow := apex_application.g_f32(ii);
APEX_COLLECTION.ADD_MEMBER('SELECTED_PERSONS', apex_application.g_f30(vrow));
END LOOP;
END IF;
end;I need to call a database function which takes an user defined type VC_ARRAY_1 defined as:
create or replace TYPE "VC_ARRAY_1" AS TABLE OF VARCHAR2(4000) How do I convert the collection to VC_ARRAY_1, so that I can call the db function?
Thanks,
RoseHi Joel,
Yes, the collection contains the person_ids. But, I am selecting from a function which returns a pipelined table. In Oracle Database, few user defined types and functions are defined as given below:
create or replace TYPE "VC_ARRAY_1" as table of varchar2(4000)
create or replace FUNCTION "GET_ARRAY" ( p_array IN varchar2, p_delimiter IN varchar2 default ':') return VC_ARRAY_1 PIPELINED
create or replace TYPE "AFFECTED_INDIVIDUAL" as object("PERSONKEY" VARCHAR2(4000), "FIRST_NAME" VARCHAR2(4000), "LAST_NAME" VARCHAR2(4000)… more variables)
create or replace TYPE "AFF_IND_TAB" as table of "AFFECTED_INDIVIDUAL"
create or replace FUNCTION GET_AFF_INDIVIDUALS(personKeys IN VC_ARRAY_1) return AFF_IND_TAB PIPELINEDThe function GET_AFF_INDIVIDUALS uses several tables and returns pipelined table. In Apex, I have a SQL query that feeds the Report query.
select * from table (get_aff_individuals(get_array(:F_SELECTED_PERSONS, ',')))The application item F_SELECTED_PERSONS is a varchar2 that contains comma separated person ids. I want to replace the application item with Apex collection. Initially, I thought that I can convert the apex collection to an array of vc_array_1.
Thanks for your time and help.
Rose -
How to get the intersection of two arraylist containing user defined obj??
How to get the intersection of two arraylist containing user defined obj??
I can easily get the intersection of two array list which containing some simple class(Integer, String). But how to get the intersection of two arrayList which contain user defined object?
Here is the sample code..I can not run this out...anybody can help me? thank you very much..
The correct result should be like this:
2
2
but I can only get this:
2
0
import java.util.*;
public class testRetain{
public static void main(String[] args){
ArrayList a = new ArrayList();
ArrayList b = new ArrayList();
a.add( new dog(1,2,2) );
a.add( new dog(1,2,1) );
System.out.println(a.size() );
b.add( new dog(1,2,2) );
a.retainAll(b);
System.out.println(a.size() );
class dog implements Comparable{
int head;
int arms;
int legs;
dog(int head, int arms, int legs){
this.head = head;
this.arms = arms;
this.legs = legs;
public int compareTo(Object o){
if ( ((dog)o).head > this.head )
return -1;
else if ( ((dog)o).head < this.head )
return 1;
else
return 0;
}@Op. Your classes should override equals and hashCode
Kaj -
How to assign a query retrived value to a user defined object in a table
how to assign a query retrived value to a user defined object in a table
Rajeshwar,
If you use the "Search" feature in this forum, you should be able to find helpful links to similar questions. You could also look at the RecordSet and DoQuery documentation in the SAP Business One SDK Help Center documentation to assist you with your question.
HTH,
Eddy -
Using stored procedure with Oracle user-defined types in database control
Hi,
I have a requirement where I need to call an Oracle Stored Proc which has IN and OUT parameters. OUT parameters are of user-defined types in Oracle packages.
I am getting error while calling the Stored proc like below:
Procedure:
==========
create or replace
PROCEDURE AA_SAM_TEST (
col1 out types_aa.aa_tex_type ,
col2 out types_aa.aa_tex_type ,
col2 out types_aa.aa_num_type ) As
Types:
======
create or replace
package types_aa as
type aa_tex_type is table of varchar2(255) index by binary_integer;
type aa_num_type is table of char index by binary_integer;
end
Wli Code:
=========
DB Control:
===========
* @jc:sql statement="call AA_SAM_TEST(?,?,?)"
void Call_AA_SAM_TEST(SQLParameter[] param) throws SQLException;
JPD Code:
=========
param = new SQLParameter[3];
Object param1 = new String();
Object param2 = new String();
Object param3 = new String();
this.param[0] = new SQLParameter(param1 , Types.STRUCT, SQLParameter.OUT);
this.param[1] = new SQLParameter(param2, Types.STRUCT, SQLParameter.OUT);
this.param[2] = new SQLParameter(param3, Types.STRUCT, SQLParameter.OUT);
database_Update.Call_AA_SAM_TEST(this.param);
I am getting the following error...
<Jul 24, 2007 6:47:42 PM IST> <Warning> <WLW> <000000> <Id=database_Update; Method=Ctrl_files.Database_Update.Call_AA_SAM_TEST(); Failure=java.sql.SQLException: ORA-06553: PLS-:
ORA-06553: PLS-:
ORA-06553: PLS-:
ORA-06553: PLS-:
ORA-06553: PLS-:
ORA-06553: PLS-306: wrong number or typ
ORA-06553: PLS-306: wrong number or types of arguments in call to 'AA_SAM_TEST'
ORA-06553: PLS-306: wrong number or types of arguments in call to 'AA_SAM_TEST'
Can anyone know how to specify OUT parameter of USer-Defined types while using a DB control to access a Stored Proc in Oracle.
Any help is highly appreciated.
ThanksHi,
I have similar problem. Have you already solved the issue?
Thanks -
How to execute function takes user defined type parameters as input &output
Hi All,
I want to execute a function which takes user defined type as input & output parameters. But i don't know how to execute that function in pl/sql statements.
CREATE TYPE T_INPUT AS OBJECT
USER VARCHAR2(255),
APPLICATION VARCHAR2(255),
REFERENCE VARCHAR2(30)
) NOT FINAL;
CREATE TYPE T_ID UNDER T_INPUT
E_ID VARCHAR2 (50),
CODE VARCHAR2 (3),
SERVICE VARCHAR2 (10),
C_TYPE VARCHAR2 (1)
) NOT FINAL;
CREATE TYPE T_OUTPUT AS OBJECT
R_STATUS NUMBER(10),
E_DESC_LANG_1 VARCHAR2(1000),
E_DESC_LANG_2 VARCHAR2(1000),
A_REFERENCE VARCHAR2(30)
) NOT FINAL;
CREATE TYPE T_INFO UNDER T_OUTPUT
E_INFO XMLTYPE
CREATE FUNCTION Get_Dtls
I_DETAILS IN T_ID,
O_DETAILS OUT T_INFO
RETURN NUMBER AS
END;
Here
1. T_ID is an input parameter which is a combination of T_ID + T_INPUT,
2. T_INFO is an output parameter which is a combination of T_INFO + T_OUTPUT.
Here i'll assign the T_ID values.
--- T_INPUT values
USER = "admin";
APPLICATION = "test";
REFERENCE = "null";
---- T_ID values
E_ID = "1234";
CODE = "TTT";
SERVICE = "NEW";
C_TYPE = "P";
Now i want to execute Get_Dtls function with T_ID,T_INFO parameters in pl/sql statements.
I want to catch the E_INFO value from T_INFO type.
How can i Do this ?
Pls Help. Thanxs in advance.
Anil.I am very new to this. New to Oracle, PL/SQL, OO programming or testing?
set serveroutput on
declare
tst_obj ctype;
begin
tst_obj := pkg.proc(11);
dbms_output.put_line('id='||tst_obj.id||'::code='||tst_obj.code||'::usage='||tst_obj.usage);
end;
/Generally I disapprove of the use of DBMS_OUTPUT (for just about anything) but it is sufficient to demonstrate the basic principle.
Really you should start using proper testing practices, ideally with an automated test harness like QUTE.
Cheers, APC
Blog : http://radiofreetooting.blogspot.com/ -
Is there any way to use a For Each Loop for each property of an User Defined Type?
Is there any way to use a For Each Loop for each property of an User Defined Type? That would be very handy!
Jorge Barbi Martins ([email protected])Alas, no, not in VBA.
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
Error erase Queries in Query Manager- The query is used with user-define...
Hello Experts
I have deleted a User Field that had a Formatted Search and now I can not remove it because it is linked according to a UF, the error message is as follows:
"The query is used with user-defined values [Message 952-23]"
There will be a way to resolve this issue???
Thanks in advanceHi Juan,
I have tried this very limited, but the formid, is this a number in your case?
SELECT * from cshs t0 inner join ouqr t1 on t0.queryid = t1.intrnalkey
where t1.qname = '[%0]'
Running this query I can get the form id that I need to recreate, but I have a feeling you already know the form id, is this correct?
- Is there an error when you try to recreate the form id?
- Will it not let you recreate the same form id because the id is given by the system?
If it is not possible to recreate the form id, please prepare a backup and log a message. Support should be able to correct the entry in table cshs.
Hope it helps.
Jesper
Maybe you are looking for
-
Looking for simple sample of iphone apps without using Interface Builder
I successfully went through the 'iphone app tutorial' and used Interface Builder, but now want to try creating apps without it. The UI Catalog sample is too complex, but didn't see anything that just had a view and a button or label. Ideally I want c
-
HP LaserJet 2600n poor print quality/streaking
I am the original owner of an HP LJ 2600n with a poor print quality/streaking issue. The poor print quality occurs with any and all paper that I use (currently Hammerhill 20# stock) and occurred with Windows XP and Windows 7. The print cartidges are
-
IPhoto slideshow images play unsharp when burnedI have rece to DVD in iDVD
I have recently created a couple of slide shows in iPhoto where they look great and pin sharp. They still look great after export to iDVD but when they are burned to DVD and played back either on the computer or on the TV DVD player they come through
-
Error in EWT certificate printing
Dear SAP Experts, I have done J1inchln and j1inbank successfully but I am not able to take the printout of certificate through J1incert. In J1incert it is giving error "No data selected for printing". Please tell me know where I am wrong. Thanks & Re
-
HI I want to create a cursor with a dynamic select, in other words, in the code,when i OPEN the cursor i want to change its query. How can i do? PS I have the 8.1.7