How to pass an IN argument of object type from VB

I need to call a PL/SQL function in Oracle 8.1.6 from VB. One of the IN arguments is an object type (TYPE). How would I instantiate the variable of Oracle object type on VB side so that it can be passed to the Oracle?
Thank you

Hi,
Per the ODP docs,
ODP.NET supports binding parameters of PL/SQL Associative Arrays which contain the following data types.
+■ BINARY_DOUBLE+
+■ BINARY_FLOAT+
+■ CHAR+
+■ DATE+
+■ NCHAR+
+■ NUMBER+
+■ NVARCHAR2+
+■ RAW+
+■ ROWID+
+■ UROWID+
+■ VARCHAR2+
It should work if you create a UDT to hold a varray of mdsys.sdo_geometry, for example.
Hope it helps,
Greg

Similar Messages

  • How to pass conventional table values in object types Dynamically

    Hi All,
    Need urgent help...
    TYPE add_ty is object
    (add1     varchar2(50),
    add2     varchar2(50),
    add2     varchar2(50))
    type add_ty_obj is table of add_ty;
    create table company_dtl
    (cmpid          number(10),
    cmpname          varchar2(100),
    address          add_ty_obj);
    table company_dtl contains demo data as below:-
    cmpid cmpname address
    C101     abc     UK,
              USA,
              AUS
    c102     xyz     UK,
              CN,
              GER
    If I want to read data from table and pass data to object add_ty_obj,
    So How can I do it dynamically. I am willing to create procedure
    which can read data from above table and pass that to mentioned object in
    OUT parameter.
    Out parameter contains same object type somewhere in middleware.
    Please help or advice.
    Thanks in Advance..

    Hi
    i have tried to make procedure that take company id as input and give their address as output.I think it might be useful for you. Or if you want something different
    please write us with more detail.
    CREATE OR REPLACE PROCEDURE READ_DATA_PROC( VAR_CMPID IN NUMBER , VAR_TYP OUT ADD_TY_OBJ)
    AS
    BEGIN
    SELECT ADDRESS INTO VAR_TYP FROM COMPANY_DTL WHERE CMPID = V_CMPID ;
    END READ_DATA_PROC;
    here i'm also adding your table and type definition i've used
    CREATE TYPE ADD_TY IS OBJECT
    (ADD1 VARCHAR2(50),
    ADD2 VARCHAR2(50),
    ADD3 VARCHAR2(50));
    CREATE TYPE ADD_TY_OBJ AS TABLE OF ADD_TY;
    CREATE TABLE COMPANY_DTL
    (CMPID NUMBER(10),
    CMPNAME VARCHAR2(100),
    ADDRESS ADD_TY_OBJ)
    NESTED TABLE ADDRESS STORE AS ADDRESS_TAB;thanks,
    Neeraj
    Edited by: Neeraj.Ora on Feb 26, 2011 1:03 PM

  • How can we execute a procedure with object type as its parameter, by passing partial elements.

    Can somebody help...
    I have a procedure which takes parameter as IN OUT extended object type .Below is the example.
    PROCEDURE p_save (example IN OUT xyz_obj)
    my object type "xyz_obj" have elements with other object types also, and that itself have around 100 elements.
    And when calling the above procedure for test purpose, how is it possible to pass partial elements of the object type rather than setting all unused elements to null.

    user13026549 wrote:
    Can somebody help...
    I have a procedure which takes parameter as IN OUT extended object type .Below is the example.
    PROCEDURE p_save (example IN OUT xyz_obj)
    my object type "xyz_obj" have elements with other object types also, and that itself have around 100 elements.
    And when calling the above procedure for test purpose, how is it possible to pass partial elements of the object type rather than setting all unused elements to null.
    It ISN'T possible. How could it be? Each attribute has to be set to something don't you think?
    A common way to handle that is to define a public package variable that is an instance of the object type and has ALL elements set to null. As Odie suggested a custom constructor function can be used for that.
    Then you create your procedure instance by starting with an instance of the package variable (where everything is null) and setting values for the attributes you need.

  • How to use an Object Type from Another Database

    Hi,
    I have this requirement that I need to call a stored procedure from another DB (db1) but I am having a problem with this because one of the input parameters uses an object type defined in that DB (db1). Is it possible to use an object type from another database? TIA!

    Sven W. wrote:
    At least for queries, but I think also for procedure arguments..You (both) probably missed my post?
    We can't use a remote type as procedure argument, even with the same OID.
    It's OK for query on a remote object column though :
    SQL> conn remote_user@remote_db
    Entrez le mot de passe :
    Connecté.
    SQL> create type mytype oid '19A57209ECB73F91E03400400B40BBE3'
      2  as object (att1 number);
      3  /
    Type créé.
    SQL> create table mytable (col1 mytype);
    Table créée.
    SQL> insert into mytable values (mytype(777));
    1 ligne créée.
    SQL> create or replace function myfunc (p_in in mytype) return number
      2  is
      3  begin
      4   return p_in.att1;
      5  end;
      6  /
    Fonction créée.
    SQL> disconn
    Déconnecté de Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> conn my_user@local_db
    Entrez le mot de passe :
    Connecté.
    SQL> create type mytype oid '19A57209ECB73F91E03400400B40BBE3'
      2  as object (att1 number);
      3  /
    Type créé.
    SQL> select * from mytable@test_dbl;
    COL1(ATT1)
    MYTYPE(777)
    SQL> declare
      2   res number;
      3  begin
      4   res := myfunc@test_dbl(mytype@test_dbl(777));
      5  end;
      6  /
    res := myfunc@test_dbl(mytype@test_dbl(777));
    ERREUR à la ligne 4 :
    ORA-06550: Ligne 4, colonne 26 :
    PLS-00331: référence non valide à REMOTE_USER.MYTYPE@TEST_DBL.WORLD
    ORA-06550: Ligne 4, colonne 2 :
    PL/SQL: Statement ignored
    SQL> declare
      2   res number;
      3  begin
      4   res := myfunc@test_dbl(mytype(777));
      5  end;
      6  /
    res := myfunc@test_dbl(mytype(777));
    ERREUR à la ligne 4 :
    ORA-06550: Ligne 4, colonne 9 :
    PLS-00306: numéro ou types d'arguments erronés dans appel à 'MYFUNC'
    ORA-06550: Ligne 4, colonne 2 :
    PL/SQL: Statement ignored

  • How do i change axis label object type from label to text? (to allow wrapping)

    In the example of a barChart, how does one change the LABEL type from "Label" to "Text"?
    I am trying to allow for long labels to wrap (ie. multi-line labels), but the default object type of labels is "Label" (which are single-line only).
    I have been researching this issue all day, and have enountered a similar situation for changing the Legend component labels where a method override is implemented in a custom itemRenderer.
    But I have not been able to figure out how to do this for an Axis label.
    Any help would be greatly appreciated!  
    J

    Yes, thank you.  I am aware of the AxisRenderer.... but I'm not sure how to implement it to change the label type from "Label" to "Text" to allow for wrapping.
    I guess what I'm looking for is a good example....  

  • How to pass serialized session/usertoken to BO webservice from xcelsius?

    I wonder how to pass serialized session/usertoken to BO webservice from xcelsius. Could anyone help me how to pass the serialized session/user token to BO web service from Xcelsius?
    Xcelsius is working fine when i use the username/password. But i would like to pass serialized session/usertoken from jsp file to Xcelsius as flash variable , then i will use this variable to get the data from webservice.
    Is that possible to send serialized session/usertoken using soap header?
    Thanks in advance...

    Hi Micheal
    Thank you for the reply.  I have already created the CELogonToken Flash Variable and i am able get the logon token and map to the flash variable.
    Now i would like to pass the same to biws as parameter. But the service has only 2 parameters as username and password.
    Is there a way that i can create my custom parameters(CELogonToken/CESerializedSession) in BIWS service?

  • How to exclude stock of a particular storage type from collective availabil

    How to exclude stock of a particular storage type from collective availability check in MDVP.

    you can set the storage location as 'Storage location stock excluded from MRP' value '1' in the field
    Sloc MRP indicator , in MRP view $ when you enter a storage location accessing the material master.
    Thsi is the only way to exclude the storage location, you have to do it per each material and also it is excluded from the MRP.
    With this option the stock is not considered in ATP.
    IF you need the storage location in the MRP, then you should consider the use of MRP Areas.
    With the MRP Areas you define which plants/storage locations belong to each MRP area and the ATP is performed for eah area with the stocks that exist in each of them.
    Please if the issue is solved set the thread  as answered and provide the points to the useful replies.
    thanks for your cooperation

  • How to Pass Command line arguments to an exe created in LV8.0

    Hi Friends,
    I have Created an exe in LV8.0, which accepts the Folder path as input and executes.
    I want to call this exe passing the parameter (i.e folder path in my case)  from the command line argument. How to pass arguments to the exe ?
    Generally we may be having different types of input parameters to a vi like numeric control, string, boolean etc..If we create an exe that needs three input parameters among which one is boolean, other is string and third is a numeric value.
    How to pass these different types of input controls to the exe as parameters in command line at the same time?
    Thanks and Regards,
    SODLB

    I don't have any experience with the 8.x application builder, but the 7.x one has a checkbox for passing the arguments to the executable.
    As for reading them, there should be an example in the example finder (Help>>Find Examples) which shows how to do this. If you want to pass multiple parameters, I suggest you use a structure similar to NAME=VALUE, so that you can parse each element to find the = and then use a case structure to decide what to do with the parameters. This allows your users to enter or not enter any of the switches.
    Try to take over the world!

  • How to pass command line arguments to Web Start appclient?

    Hi,
    I would like to pass arguments to appclient, but "javaws" unable to do that.
    Do I have to overwrite the JNLP? I use Sun Appserver 9.0, it creates JNLP on the fly!!!
    Please help, thanx!
    MB

    Hi, MB.
    If you are talking about the automatic Java Web Start support for launching app clients in GlassFish, you can pass the equivalent of command line arguments using the query string of the URL you use to launch the app client.
    Briefly, use
    http://host:port/client-path?arg=first-arg&arg=second-arg& ...
    specifying the argument values in the order that you want them passed to the client.
    The GlassFish server will do the right thing and generates the correct JNLP so your arguments are passed to the app client.
    The GlassFish developer's guide http://glassfish.dev.java.net/nonav/javaee5/docs/AS91DG.pdf discusses this and all aspects of the Java Web Start support. You can also take a look at this blog entry http://blogs.sun.com/quinn/entry/command_line_arguments_and_properties that focuses on how to pass arguments.
    Since this technique deals with argument passing in the URL, it works no matter how you launch the app client: a URL in a browser, the javaws command, etc.
    - Tim

  • How to pass command line arguments to JWS app

    Hi,
    I want to pass command line arguments to my JWS application. However those arguments are dynamic (eg the username of the user who launched the app) and thus I can not use the argument tag of JNLP file. So what do I need to do in this case?
    Thanks.

    Well, if it's the username on your server systems you should probably include it in the jnlp: can pass it in the url, write once and remove jnlp href attribute, etc.., etc.. (a quick tour of this forum should suffice).
    If it's the OS username you should be able to retrieve it through system properties.
    Whatever it is, passing dynamic arguments means launching javaws through a shell or a shell script (bat if running on windows), so you won't be able to launch through autogenerated desktop and menu shortcuts.
    Anyway, you have two solutions:
    Clean one: associate an extension to your app and write those infos in a file named after that extension.
    Dirty one (always seen it work, but there's no warranty): javaws -open whateverParamYouLike yourAppURL.jnlp, will pass to your main method '-open' as args[0] and '+whateverParamYouLike+' as args[1]. I gotta admin I used it, but I had the most peculiar reason (my app needed another instance on a different JRE aware of being a secondary instance at startup time).
    Bye.
    PS: I'd really love dukes ;-)

  • Calling a PL/SQL from VB with IN argument of object type

    I need to call a PL/SQL function in Oracle 8.1.6 from VB. One of the IN arguments is an object type (TYPE). How would I instantiate the variable of Oracle object type on VB side so that it can be passed to the Oracle?
    Thank you

    You have some flaws in your code.
    First - don't use same identifier for pl sql variables ( including parameters) and column names. In your case oracle will evaluate the where clause as where column_name=column_name which is probably not what you want. The next one - you should ensure that select into yields one row , not more, not less, otherwise you 'll run into exception.
    To actually print the desired values, you have to use dbms_output aware client ( sqlplus is such one) and for sqlplus in particular you have to issue set serveroutput on
    Here is a very basic example how can you get it to work:
    SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> CREATE OR REPLACE PROCEDURE FIND_EMPLOYEES
      2  (p_first_name IN VARCHAR2)
      3  IS
      4  LAST varchar2(10);
      5  BEGIN
      6          SELECT LAST_NAME INTO LAST FROM EMPLOYEES WHERE FIRST_NAME = p_first_name;
      7          dbms_output.put_line(LAST);
      8  EXCEPTION
      9    WHEN no_data_found THEN
    10    dbms_output.put_line('There is no one employee with such first name!');
    11    WHEN too_many_rows THEN
    12    dbms_output.put_line('There are many employees with such first name, try with another one!');
    13  END FIND_EMPLOYEES;
    14  /
    Procedure created.
    SQL> SET SERVEROUTPUT ON
    SQL> EXEC FIND_EMPLOYEES('Julia')
    There are many employees with such first name, try with another one!
    PL/SQL procedure successfully completed.
    SQL> EXEC FIND_EMPLOYEES('Eugenia')
    There is no one employee with such first name!
    PL/SQL procedure successfully completed.
    SQL> EXEC FIND_EMPLOYEES('Adam')
    Fripp
    PL/SQL procedure successfully completed.Best regards
    Maxim

  • How to trigger a form based on object type and process type

    Hi all,
    I am new into SRM.. I have been asked to develop a form by cloning an existing standard form..
    Using bbp_output_change_sf badi you can trigger the form by passing the object type but the scenario is such that depending on the object type and process type the new form should be triggered.
    The parameter iv_object_type passes the object type but how could i pass the process type ?
    In the badi I noticed an import parameter is_event that has a field called transction_type that carries the process type but this field never got populated when i checked using debugger.
    Please help as to how i can trigger the form based on the object_type and the process_type.
    Thanx in advance.

    Thanx again Jay Yang.. Well is there any possibility that you could get the items that were confirmed..
    Let me eleborate..
    Suppose in the PO u order an item for 10 nos and 5 gets confirmed and u return 2..
    Well in my case it is that i need to fill up a field Qty returned / Qty confirmed..
    I was able to get the number of items from the PO by passing the the passing the parameter to the FM "bbp_pd_conf_getdetaill"
    but i dont know how to get the number of items been confirmed..
    The quantity field in the line item structure gives me the number of items returned..
    Can u tell me how to get the number of items been confirmed....

  • Error in creation of Object Type from XML passed

    Hi,
    I am facing a problem creating a appropriate a object type for a XML.
    Below are the details:
    XML Passed
    <mer_offer_action_data>
    <form_id>
    134039588
    </form_id>
    <action_cd>
    OA
    </action_cd>
    <offer_decline_reason_cd>
    </offer_decline_reason_cd>
    <start_dt>
    </start_dt>
    <candidate>
    <ds_prs_id>
    109315
    </ds_prs_id>
    <ds_prs_id>
    110534
    </ds_prs_id>
    <ds_prs_id>
    110059
    </ds_prs_id>
    </candidate>
    </mer_offer_action_data>
    Types Declaration
    +CREATE OR REPLACE type MER_OFF_CANDIDATE
    AS
    OBJECT
    DS_PRS_ID NUMBER
    CREATE OR REPLACE TYPE MER_OFF_CANDIDATE_t
    AS
    TABLE OF MER_OFF_CANDIDATE;
    CREATE OR REPLACE type MER_OFFER_ACT_DATA
    AS
    OBJECT
    FORM_ID NUMBER,
    ACTION_CD VARCHAR2(6),
    OFFER_DECLINE_REASON_CD VARCHAR2(6),
    START_DT VARCHAR2(11),
    CANDIDATE MER_OFF_CANDIDATE_t
    CREATE OR REPLACE TYPE MER_OFFER_ACT_DATA_t
    AS
    TABLE OF MER_OFFER_ACT_DATA;
    CREATE OR REPLACE type MER_OFFER_ACTION_DATA
    AS
    OBJECT
    MER_OFF_ACT_DATA MER_OFFER_ACT_DATA_t
    /+
    My Declaration
    +merOffActDataXML      xmltype;
    merOffActData     MER_OFFER_ACTION_DATA := MER_OFFER_ACTION_DATA(MER_OFFER_ACT_DATA_t());+
    Inside Pl/SQL block
    +-- Converts XML data into user defined type for further processing of data
    xmltype.toobject(merOffActDataXML,merOffActData);+
    when I run the Pl/Sql block it gives me error
    ORA-19031: XML element or attribute FORM_ID does not match any in type ORADBA.MER_OFFER_ACTION_DATA
    which means the object type mapping is wrong
    I would like to know whether the object type I had created is correct or not.
    Thanks for your help
    Beda

    Bedabrata Patel wrote:
    Below are the details:The details except for a description of the problem
    I am facing a problem creating a appropriate a object type for a XML.And which error you are getting
    Error in creation of Object Type http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/toc.htm
    And which version of Oracle you are getting the unknown error creating the unknown problem.

  • FIM Synchronization Service - How to provsion a group to another object type

    Hi,
    i'm new to fim and use just the fim2010 synchronization engine with some rules extensions.
    I have 2 ActiveDirectories and want to Provision a Group(used as Distribution list) from ActiveDirectory A as a contact object in ActiveDirectory B with the SMTP address of the Group as the targetaddress of the contact.
    Can you give me a hint how to accomplish that?
    Should i use the ShouldProjectToMV() Method in the rulesextension from the AD Connector of Domain A and out the Group as a Special mvtype? How do i join (what anchor to use) the Group to Domain B if i also sync normal contact objects as well?
    Thanks you for your help!

    If you want to decide that object is deleted you need to implement your de-provisioning logic. 
    De-provisioning logic should be implemented in Provision method as well. You need there something like:
    if(I_dont_have_contact_for_group)
    Provison_new_one
    } else
    if(do_I_Have_email_on_my_group_in_mv)
    No -> delete_contact_in_other_forest
    Depends on the target agent scope, if you have there other object types than contacts, you may want to implement Deprovision() method in agent extension to decide that contact should be deleted but other type of objects not.
    Tomek Onyszko, memberOf Predica FIM Team (http://www.predica.pl), IdAM knowledge provider @ http://blog.predica.pl

  • How to return object  type from external c procedure ?

    Hello all,
    I'm trying for the first time to return an object type as the return value of an external stored procedure (in C ).
    I don't have any issue to use an object type parameter for the function but not to return one to the caller.
    each time I try I get "ORA-03113: end-of-file on communication channel" and the connection is dropped.
    Thanks for any help,
    Roye Avidor
    here is the code :
    => object type
    SQL>create or replace type address as object ( age number, salary float );
    => address typ file
    CASE=SAME
    TYPE address as address
    => building the dependences structures.
    $>ott userid=scott/tiger intype=address.type code=c hfile=address.h
    => the package description
    create or replace package userTypeDefined_PKG
    is
    function getAddr( addr address ) return address;
    end;
    create or replace package body userTypeDefined_PKG
    is
    function getAddr( addr address ) return address
    AS LANGUAGE C
    NAME "addr"
    LIBRARY userTypeDefinedLib
    WITH CONTEXT
    PARAMETERS
    ( CONTEXT,
    addr,
    addr INDICATOR STRUCT ,
    return address,
    return INDICATOR STRUCT
    end;
    => The C code for the library in
    address* addr(OCIExtProcContext ctx, address address_obj, address_ind address_obj_ind, address_ind ret_ind){
    unsigned int tt;
    OCIEnv *envh;
    OCIError *errh;
    OCISvcCtx *svch;
    sword err;
    address* ret = NULL;
    int inum = 69;
    float fnum = 12.34;
    /* get OCI Environment */
    err = OCIExtProcGetEnv(ctx, &envh, &svch, &errh) ;
    /* allocate space for return sturcture*/
    ret = (address *)OCIExtProcAllocCallMemory(ctx, sizeof(address));
    /* set the AGE value */
    if ( OCINumberFromInt ( errh, &inum, sizeof(inum), OCI_NUMBER_SIGNED, &(ret->AGE) ) == OCI_ERROR )
    OCIExtProcRaiseExcp(ctx,(int)1476); // raise 1476 is fail
    /* set the SALARY value */
    if ( OCINumberFromReal ( errh, &fnum, sizeof(fnum), &(ret->SALARY) ) == OCI_ERROR )
    OCIExtProcRaiseExcp(ctx,(int)1477);// raise 1477 is fail
    // set the indicators for the structure as not null
    ret_ind->atomic = OCIIND_NOTNULL;
    ret_ind->AGE = OCI_IND_NOTNULL;
    ret_ind->SALARY = OCI_IND_NOTNULL;
    return (ret);
    }

    The return indicator should be declared as double pointer, and need to be allocated in the function body.

Maybe you are looking for

  • Using general midi loops in ultrabeat

    I want to keep it SIMPLE. I don't want to hassle with programming drum sequences. This is what I want to do, take GENERAL MIDI loops from actual live drum performances into Logic Express 8, use them to trigger hi resolution acoustic drum samples in U

  • Problems with browsers and 'w' key since updates

    Hi I ran 'pacman -Syu' a little over a week ago, and since then I've been experiencing two rather odd problems. 1. Using any web-browser (firefox, epiphany, songbird, etc), visiting pages that make use of javascript (i -think- that's the cause) makes

  • Hp 1315 all-in-one won't print black

    1315 all-in-one prints text in green (instead of black), prints multi colored documents in green and yellow. Both cartridges are new. Prints test page fine. Extended self test: Vert cart to cart alignment setting: 0  0 Horizontal ......              

  • Export to movie is HORRIBLE quality!

    Hi, my flash movie looks great when it is in it's .swf format. However, when I use the export to .avi option it comes out as REALLY horrible quality. Exporting to quicktime does nothing. I've been looking online and have only found people having the

  • Swapping out a raid array

    Hello:     I currently have a raid5 array for my desktop, but the disks are getting old and I'd like to replace it.  Currently I'm using 3x500GB disks.  I'd like to replace this with 4x2TB disks.   In order to reduce the risk of data loss, I would ra