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.

Similar Messages

  • How to return oracle type from select statment

    I have the following oracle[b] types
    create or replace type course_obj as object
         name varchar2(20),
         start_date date,
         instructor varchar2(20)
    create or replace type course_arr
    is varray(10000) of course_obj;
    create or replace type student_obj as object
    first_name varchar2(50),
    last_name varchar2(50),
    student_number number,
    courses course_arr
    create or replace type student_arr
    is varray(10000) of student_obj;
    package
    CREATE OR REPLACE PACKAGE testing
    AS
    FUNCTION get_student_info ( student_number in number ) RETURN student_arr PIPELINED;
    END;
    CREATE OR REPLACE PACKAGE BODY testing
    AS
    FUNCTION get_student_info ( student_number in number ) RETURN student_arr PIPELINED IS
    course1 course_obj;
    course2 course_obj;
    courses course_arr := course_arr();
    student student_obj;
    BEGIN
    course1 := course_obj('Computer 101', sysdate, 'John Anderson');
    course2 := course_obj('Computer 102', sysdate, 'Jo Doe');
    courses.extend;
    courses(1) := course1;
    courses.extend;
    courses(2) := course2;
    student := student_obj('Jack', 'Smith', 781509790, courses);
    PIPE ROW(student);
    END;
    END;
    When I issue the following select SQL
    select student_number, courses from table(testing.get_student_info(1))
    The result I get is
    student
    number courses
    781509790 ((Computer 101, 9/7/2006 5:13:11 PM, John Anderson), (Computer 102, 9/7/2006 5:13:11 PM, Jo Doe), , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , )
    How can I return the result as
    student
    number name start date instructor
    781509790 Computer 101 9/7/2006 5:13:11 PM John Anderson
    781509790 Computer 102 9/7/2006 5:13:11 PM Joe Doe

    Hi,
    Instead of creating varray, create a table type of objects for both courses as well as students like below.
    create or replace type course_obj as object
    name varchar2(20),
    start_date date,
    instructor varchar2(20)
    create or replace type course_arr
    as TABLE OF course_obj;
    create or replace type student_obj as object
    first_name varchar2(50),
    last_name varchar2(50),
    student_number number,
    courses course_arr
    create or replace type student_arr as TABLE OF student_obj
    Then create a pipelined function like below,
    CREATE OR REPLACE FUNCTION get_student_info ( student_number in number )
    RETURN student_arr PIPELINED IS
    student_arr1 student_arr:=student_arr();
    course_arr1 course_arr:=course_arr();
    i number:=0;
    BEGIN
    i:=i+1;
    course_arr1.extend;
    student_arr1.extend;
    course_arr1(course_arr1.count) := course_obj('maths',sysdate,'vv2');
    student_arr1(student_arr1.count) := student_obj('raja','ram',23232,course_arr1);
    PIPE ROW(student_arr1(i));
    course_arr1(course_arr1.count) := course_obj('computer',sysdate,'vv');
    student_arr1(student_arr1.count) := student_obj('raj','raam',223232,course_arr1);
    PIPE ROW(student_arr1(i));
    END;
    You'll get the result like below,
    FIRST_NAME LAST_NAME STUDENT_NUMBER
    COURSES(NAME, START_DATE, INSTRUCTOR)
    raja ram 23232
    COURSE_ARR(COURSE_OBJ('maths', '08-SEP-06', 'vv2'))
    raj raam 223232
    COURSE_ARR(COURSE_OBJ('computer', '08-SEP-06', 'vv'))
    With regards
    Ram

  • 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 to get object type and object key from Bapi_acc_gl_posting_post

    Hi,
      Currently iam implementing FB01 transaction thru Bapi_acc_gl_posting_post.
    I got object key by including document no, fiscal year and Document data
    I got object type from TTYP table. But iam not sure it is correct.
    After implemeting the BAPI return code is giving successfull and i commited the process.
    But at last data is not updating in BKPF table. There is no document number displayed at BKPF...Please go thru and do the needful its urgent.
    Thanks in advance....
    Regards,
    Ganga

    Hi Max,
            I have executed it and it is working only for GL posting but i need to make this for different accounting types like vendors, customers, material customers etc.
    I found BAPI_ACC_DOCUMENT_POST. when i executed it is giving error as 'Line entered several Times'.
    I following is my code. If time permits please go thru my code and do the need ful..
    Thanks in advance.
    REPORT  zk_fi_fb01                     .
    Data: v_objkey(20) type c.
    Data: Docheader type BAPIACHE09.
    Data: ACCOUNTGL LIKE BAPIACGL09 occurs 0 with header line,
         ACCOUNTRECEIVABLE like BAPIACAR09,
          ACCOUNTPAYABLE like BAPIACAP09 occurs 0 with header line,
          CURRENCYAMOUNT like BAPIACCR09 occurs 0 with header line,
          RETURN like BAPIRET2 occurs 0.
    Data: obj_typ like BAPIACHE09-OBJ_TYPE,
          OBJ_KEY like BAPIACHE09-OBJ_KEY,
          OBJ_SYS like BAPIACHE09-OBJ_SYS.
    *Data: gv_belnr type belnr_d.
    *Data:file_Na type String.
    Data: lsys like TBDLS-LOGSYS.
    *START OF SELECTION
    START-OF-SELECTION.
    *CALL FUNCTION 'NUMBER_GET_NEXT'
    EXPORTING
       nr_range_nr                  = '19'
       object                       = 'RF_BELEG' "'FIAA-BELNR'
      QUANTITY                      = '1'
      SUBOBJECT                     = '7777'
      TOYEAR                        = '2007'
      IGNORE_BUFFER                = ' '
    IMPORTING
      NUMBER                        = gv_belnr
    QUANTITY                      =
    RETURNCODE                    =
    *CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
      OWN_LOGICAL_SYSTEM                   = lsys
    EXCEPTIONS
      OWN_LOGICAL_SYSTEM_NOT_DEFINED       = 1
      OTHERS                               = 2
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *concatenate gv_belnr '7777' '2007' into v_objkey.
    *Filling Document Header Details
    *Docheader-OBJ_TYPE = 'BEBD'.
    *Docheader-OBJ_key = V_objkey.
    *Docheader-OBJ_SYS = lsys.
    docheader-BUS_ACT = 'RFBU'.
    Docheader-USERNAME = sy-uname.
    Docheader-COMP_CODE = '7777'.
    Docheader-DOC_DATE   = '20070724'.
    Docheader-PSTNG_DATE = '20070725'.
    Docheader-FISC_YEAR = '2007'.
    Docheader-DOC_TYPE = 'KZ'.
    *Item data for ACCOUNTGL
    ACCOUNTGL-ITEMNO_ACC = '0000000001'.
    ACCOUNTGL-GL_ACCOUNT = '0000000501'.
    ACCOUNTGL-DOC_TYPE   =  'KZ'.
    ACCOUNTGL-COMP_CODE  = '7777'.
    ACCOUNTGL-FISC_YEAR  = '2007'.
    ACCOUNTGL-PSTNG_DATE = '20070725'.
    *ACCOUNTGL-DE_CRE_IND = 'S'.
    append ACCOUNTGL.
    ACCOUNTGL-ITEMNO_ACC = '0000000002'.
    ACCOUNTGL-GL_ACCOUNT = '0000400002'.
    ACCOUNTGL-DOC_TYPE   = 'KR'.
    ACCOUNTGL-COMP_CODE  = '7777'.
    ACCOUNTGL-FISC_YEAR  = '2007'.
    ACCOUNTGL-PSTNG_DATE = '20070725'.
    *ACCOUNTGL-DE_CRE_IND = 'H'.
    append ACCOUNTGL.
    *Account payable
    ACCOUNTPAYABLE-ITEMNO_ACC = '0000000001'.
    ACCOUNTPAYABLE-GL_ACCOUNT = '0000000102'.
    ACCOUNTPAYABLE-COMP_CODE  = '7777'.
    append ACCOUNTPAYABLE.
    ACCOUNTPAYABLE-ITEMNO_ACC = '0000000002'.
    ACCOUNTPAYABLE-GL_ACCOUNT = '0000400002'.
    ACCOUNTPAYABLE-COMP_CODE  = '7777'.
    append ACCOUNTPAYABLE.
    *Currency Amount
    CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.
    CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
    MOVE 1000 TO CURRENCYAMOUNT-AMT_DOCCUR.
    Append CURRENCYAMOUNT.
    CURRENCYAMOUNT-ITEMNO_ACC = '0000000002'.
    CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
    MOVE '1000-' to CURRENCYAMOUNT-AMT_DOCCUR.
    Append CURRENCYAMOUNT.
    clear CURRENCYAMOUNT.
    clear ACCOUNTGL.
    clear ACCOUNTPAYABLE.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader          = Docheader
      CUSTOMERCPD             =
      CONTRACTHEADER          =
    IMPORTING
       OBJ_TYPE                =  obj_typ
       OBJ_KEY                 =  obj_key
       OBJ_SYS                 =  obj_sys
      tables
       ACCOUNTGL               = ACCOUNTGL[]
      ACCOUNTRECEIVABLE       =
       ACCOUNTPAYABLE          = ACCOUNTPAYABLE
      ACCOUNTTAX              =
        currencyamount          = CURRENCYAMOUNT
      CRITERIA                =
      VALUEFIELD              =
      EXTENSION1              =
        return                  = return.
    if sy-subrc = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = ' '.
    endif.
    if sy-subrc = 0.
    WRITE: / OBJ_KEY,
             OBJ_TYP,
             OBJ_SYS.

  • Possibility of returning derived type from inherited operator

    Hello forum,
    I am wondering the possibility of returning a derived type from an inherited operator. A test case would include two class definitions such as:
    Public Class Base
    Dim _a
    Public ReadOnly Property A As Integer
    Get
    Return _a
    End Get
    End Property
    Public Shared Operator +(ByVal base1 As Base, _
    ByVal base2 As Base) As Base
    Return New Base(base1.A + base2.A)
    End Operator
    Public Sub New(ByVal a As Integer)
    _a = a
    End Sub
    End Class
    Public Class Derived
    Inherits Base
    Public Sub New(ByVal a As Integer)
    MyBase.New(a)
    End Sub
    End Class
    and implementation such as:
    Dim derivedA As Derived = New Derived(1)
    Dim derivedB As Derived = New Derived(1)
    Dim derivedResult As Derived = derivedA + derivedB
    'would like result as derived, not base!
    This test case returns the error that the derivedResult cannot by cast to the base type (as this is how the operator is defined). I am wondering: is there a way to change the operator definition so that the derived type is returned from the operation? There
    could be many derived types and avoiding overloading the method in each type definition could reduce the amount of code.
    Many thanks.

    I'm just Frank, not "Mr. Smith". ;-)
    I suspect that Reed is onto it with generics. He's quite familiar with it and in a question I posted a few years ago - about derived classes - he answered it using generics.
    Let's see what you or he comes up with. :)
    Still lost in code, just at a little higher level.
    Haha, I was like "who is Mr. Smith.... oh yeah, that's Frank's last name".  ;)
    @James3210:  same here... it's just Reed.  Wearing a shirt with a collar is about as formal as I get.  :)
    Anyway, back to the subject at hand, I think the generic method in conjunction with the operator overload is the way to go.  Since you'll have to write the operator on each class anyway, at least you can copy-paste the operator code and then just change
    the type used for "T":
    Public Class FooBase
    Private anInteger As Integer
    Protected Shared Function Add(Of T As {FooBase, New})(source As T, target As T) As FooBase
    Return New T() With {.anInteger = source.anInteger + target.anInteger}
    End Function
    Public Shared Operator +(source As FooBase, target As FooBase) As FooBase
    Return FooBase.Add(Of FooBase)(source, target)
    End Operator
    End Class
    Public Class DerivedFoo
    Inherits FooBase
    Public Overloads Shared Operator +(source As DerivedFoo, target As DerivedFoo) As DerivedFoo
    Return FooBase.Add(Of DerivedFoo)(source, target)
    End Operator
    End Class
    Public Class DerivedFooTwo
    Inherits FooBase
    Public Overloads Shared Operator +(source As DerivedFooTwo, target As DerivedFooTwo) As DerivedFooTwo
    Return FooBase.Add(Of DerivedFooTwo)(source, target)
    End Operator
    End Class
    In this example the shared Add() method is internal to the FooBase objects, but you could make the access modifier public if you wanted to expose the method for direct use.
    -EDIT-
    Sorry, I forgot you wanted to return the object type from the operator, not the internal result.  I've updated the code to return a new object instance.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • [UIX] How To: Return multiple values from a LOV

    Hi gang
    I've been receiving a number of queries via email on how to return multiple items from a LOV using UIX thanks to earlier posts of mine on OTN. I'm unfortunately aware my previous posts on this are not that clear thanks to the nature of the forums Q&A type approach. So I thought I'd write one clear post, and then direct any queries to it from now on to save me time.
    Following is my solution to this problem. Please note it's just one method of many in skinning a cat. It's my understanding via chatting to Oracle employees that LOVs are to be changed in a future release of JDeveloper to be more like Oracle Forms LOVs, so my skinning skills may be rather bloody & crude very soon (already?).
    I'll base my example on the hr schema supplied with the standard RDBMS install.
    Say we have an UIX input-form screen to modify an employees record. The employees record has a department_id field and a fk to the departments table. Our requirement is to build a LOV for the department_id field such that we can link the employees record to any department_id in the database. In turn we want the department_name shown on the employees input form, so this must be returned via the LOV too.
    To meet this requirement follow these steps:
    1) In your ADF BC model project, create 2 EOs for employees and departments.
    2) Also in your model, create 2 VOs for the same EOs.
    3) Open your employees VO and create a new attribute DepartmentName. Check “selected in query”. In expressions type “(SELECT dept.department_name FROM departments dept WHERE dept.department_id = employees.department_id)”. Check Updateable “always”.
    4) Create a new empty UIX page in your ViewController project called editEmployees.uix.
    5) From the data control palette, drag and drop EmployeesView1 as an input-form. Notice that the new field DepartmentName is also included in the input-form.
    6) As the DepartmentName will be populated either from querying existing employees records, or via the LOV, disable the field as the user should not have the ability to edit it.
    7) Select the DepartmentId field and delete it. In the UI Model window delete the DepartmentId binding.
    8) From the data controls palette, drag and drop the DepartmentId field as a messageLovInput onto your page. Note in your application navigator a new UIX page lovWindow0.uix (or similar) has been created for you.
    9) While the lovWindow0.uix is still in italics (before you save it), rename the file to departmentsLov.uix.
    10) Back in your editEmployees.uix page, your messageLovInput source will look like the following:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="${bindings.DepartmentId.path}"
        destination="lovWindow0.uix"/>Change it to be:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="DepartmentId"
        destination="departmentsLov.uix"
        partialRenderMode="multiple"
        partialTargets="_uixState DepartmentName"/>11) Also change your DepartmentName source to look like the following:
    <messageTextInput
        id=”DepartmentName”
        model="${bindings.DepartmentName}"
        columns="10"
        disabled="true"/>12) Open your departmentsLov.uix page.
    13) In the data control palette, drag and drop the DepartmentId field of the DepartmentView1 as a LovTable into the Results area on your page.
    14) Notice in the UI Model window that the 3 binding controls have been created for you, an iterator, a range and a binding for DepartmentId.
    15) Right click on the DepartmentsLovUIModel node in the UI Model window, then create binding, display, and finally attribute. The attribute binding editor will pop up. In the select-an-iterator drop down select the DepartmentsView1Iterator. Now select DepartmentName in the attribute list and then the ok button.
    16) Note in the UI Model you now have a new binding called DCDefaultControl. Select this, and in the property palette change the Id to DepartmentName.
    17) View the LOV page’s source, and change the lovUpdate event as follows:
    <event name="lovSelect">
        <compound>
            <set value="${bindings.DepartmentId.inputValue}" target="${sessionScope}" property="MyAppDepartmentId" />
            <set value="${bindings.DepartmentName.inputValue}" target="${sessionScope}" property="MyAppDepartmentName" />
        </compound>
    </event>18) Return to editEmployees.uix source, and modify the lovUpdate event to look as follows:
    <event name="lovUpdate">
        <compound>
            <set value="${sessionScope.MyAppDepartmentId}" target="${bindings.DepartmentId}" property="inputValue"/>
            <set value="${sessionScope.MyAppDepartmentName}" target="${bindings.DepartmentName}" property="inputValue"/>     
        </compound>
    </event>That’s it. Now when you select a value in your LOV, it will return 2 (multiple!) values.
    A couple things to note:
    1) In the messageLovInput id field we don’t use the “.path” notation. This is mechanism for returning 1 value from the LOV and is useless for us.
    2) Again in the messageLovInput we supply “_uixState” as an entry in the partialTargets.
    3) We are relying on partial-page-refresh functionality to update multiple items on the screen.
    I’m not going to take the time out to explain these 3 points, but it’s worthwhile you learning more about them, especially the last 2, as a separate exercise.
    One other useful thing to do is, in your messageLovInput, include as a last entry in the partialTargets list “MessageBox”. In turn locate the messageBox control on your page (if any), and supply an id=”MessageBox”. This will allow the LOV to place any errors raised in the MessageBox and show them to the user.
    I hope this works for you :)
    Cheers,
    CM.

    Thanks Chris,
    It took me some time to find the information I needed, how to use return multiple values from a LOV popup window, then I found your post and all problems were solved. Its working perfectly, well, almost perfectly.
    Im always fighting with ADF-UIX, it never does the thing that I expect it to do, I guess its because I have a hard time letting go of the total control you have as a developer and let the framework take care of a few things.
    Anyway, I'm using your example to fill 5 fields at once, one of the fields being a messageChoice (a list with countries) with a LOV to a lookup table (id , country).
    I return the countryId from the popup LOV window, that works great, but it doesn't set the correct value in my messageChoice . I think its because its using the CountryId for the listbox index.
    So how can I select the correct value inside my messageChoice? Come to think of it, I dont realy think its LOV related...
    Can someone help me out out here?
    Kind regards
    Ido

  • How do I return two values from a stored procedure into an "Execute SQL Task" within SQL Server 2008 R2

    Hi,
    How do I return two values from a
    stored procedure into an "Execute SQL Task" please? Each of these two values need to be populated into an SSIS variable for later processing, e.g. StartDate and EndDate.
    Thinking about stored procedure output parameters for example. Is there anything special I need to bear in mind to ensure that the SSIS variables are populated with the updated stored procedure output parameter values?
    Something like ?
    CREATE PROCEDURE [etl].[ConvertPeriodToStartAndEndDate]
    @intPeriod INT,
    @strPeriod_Length NVARCHAR(1),
    @dtStart NVARCHAR(8) OUTPUT,
    @dtEnd NVARCHAR(8) OUTPUT
    AS
    then within the SSIS component; -
    Kind Regards,
    Kieran. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Below execute statement should work along the parameter mapping which you have provided. Also try specifying the parameter size property as default.
    Exec [etl].[ConvertPeriodToStartAndEndDate] ?,?,? output, ? output
    Add a script task to check ssis variables values using,
    Msgbox(Dts.Variables("User::strExtractStartDate").Value)
    Do not forget to add the property "readOnlyVariables" as strExtractStartDate variable to check for only one variable.
    Regards, RSingh

  • How do I retrieve data from external hard drive

    How do I retrieve data from external hard drive

    What problem are you encountering?
    Normally you would connect it to your Mac and just drag and drop.

  • How do I copy iTunes from external hard drive to iMac?

    How do I copy iTunes from external
    Hard drive to iMac?

    if your main library is on your external, then when not connected, you wont have access to it.
    so first decide, where do you want to keep the files.
    E.g. In my case, I keep my files on "C:\iTunes Music".
    I have a backup on external "Z:\iTunes Backup". If I format my laptop, this is how I restore everything.
    Edit -> Preferences -> Advanced.
    The iTunes music folder in selects as "C:\iTunes Music"
    I have checked Keep iTunes Music Folder Organized, and also Copy Files to iTunes Music folder when adding to ibrary". Click OK to save and close preferences.
    My iTunes list is now empty. I go to file, and select "Add Folder to Library". From that window, I select "Z:\iTunes Backup". iTunes then copies everything from the backup to "C:\iTunes Music". For me, backup is backup, I dont need it to play music.
    Now decide this. If you do not want to keep music on C:, but want to only connect the external to update music on your ipod, do this:
    In preferences, set iTunes Music folder as "Z:\iTunes Backup", and uncheck Copy files to iTunes Music folder, since they are already there. Then in files, select Add folder to library again to build and update the list.

  • HT1660 How do I run itunes from external Hard drive?

    How do I run itunes from external hard drive. I only have ssd on PC and media is too large to fit

    You do not.
    iTunes, like all programs is installed on the C drive.
    You can store the media on another drive.
    Assuming you are moving an existing library from another computer:
    Move or Copy the ENTIRE iTunes folder from the old computer to the new computer and put it where you want it.
    Install iTunes using the default options.
    Hold <SHIFT> while launching iTunes.  It will prompt to create a new library or locate an existing library.
    Select the option to locate an existing library.
    Point iTunes to the iTunesLibrary.itl file in the iTunes folder that was moved from the old computer.

  • How to crete data type from XSD

    Hi All,
    can anyone tell me ...how to create data type from agiven xsd.
    I need urgently....
    thanks in advance....

    import this XSD, load this in your mapping editor and then use this to crate the datatype manually.
    Or, use XML spy, load this XSD and then you should be able to see the Structure, or,
    Look into the XSD data and decipher things yourself
    Regards
    Bhavesh

  • How do I import photos from external hard drive to iCloud library?

    I have saved many photos to an external hard drive for security. I would like to store at least some of them in iCloud so I have direct access from Photos. Is this possible please?

    how do I import photos from external hard drive to iCloud library?
    Just like you'd do it with iPhoto.  Drag the photos or folder of photos into the open Photos Library window or onto the Photos icon in the Dock.
    If you have the iCloud Photo Library activated in Photos the new photos will be copied to the online iCloud Photo Library along with the rest of the photos in your library.  Remember, with the iCloud Photo Liberty it's all the photos or none.  You may have to purchase additional iCloud space to store all of your photos.

  • How to pick activity type from HR mini master during activity confirmation

    Hi,
    How to pick activity type from HR mini master during activity confirmation via BAPI "BAPI_NETWORK_CONF_ADD".
    I have confirmed activity via bapi BAPI_NETWORK_CONF_ADD, and it is picking activity type from activity. but i wants from HR mini master. In BAPI i am passing Personal no.
    Thanks in advance.

    Hi,
    Did you mention Activity type information in HR Master-315 InfoType (TimeSheet Default value).
    then you can get the value.
    Vemula

  • Returning a table from a stored procedure

    hi, i need to return a table from a stored procedure and show it, and come to this, but a don't know hoy to run it, so i don't know if it is right, can anyone help me?
    uTable out objects_uptime%rowtype
    as
    begin
    select * into uTable from objects_uptime;
    end;

    well, i finally discovered how to do the trick
    this is the code for the function:
    CREATE OR REPLACE FUNCTION FN_GET_RECORDS RETURN UPTIME PIPELINED IS
    CURSOR cUptime is select * from objects_uptime;
    p refcur.refcur_t;
    temp p%ROWTYPE;
    temp2 OUPTIME := OUPTIME(null, null, null, null, null, null, null, null, null);
    BEGIN
    OPEN cUptime;
    LOOP
    FETCH cUptime into temp;
    temp2.OBJ_NAME := temp.OBJ_NAME;
    temp2.IP := temp.IP;
    temp2.STATUS := temp.STATUS;
    temp2.DOE := temp.DOE;
    temp2.ENABLED := temp.ENABLED;
    temp2.COMMENT00000 := temp.COMMENT00000;
    temp2.USERID := temp.USERID;
    temp2.OBJECTID := temp.OBJECTID;
    temp2.MNTID := temp.MNTID;
    pipe row(temp2);
    EXIT WHEN cUptime%NOTFOUND;
    END LOOP;
    RETURN;
    END FN_GET_RECORDS;
    and this for the auxiliar package, object and table:
    CREATE OR REPLACE PACKAGE REFCUR
    as
    TYPE refcur_t IS REF CURSOR RETURN objects_uptime%ROWTYPE;
    end REFCUR;
    CREATE OR REPLACE TYPE OUPTIME AS OBJECT ( "OBJ_NAME"
    VARCHAR2(255), "IP" VARCHAR2(20), "STATUS" VARCHAR2(10),
    "DOE" DATE, "ENABLED" NUMBER(10, 1), "COMMENT00000"
    VARCHAR2(1000), "USERID" VARCHAR2(50), "OBJECTID" NUMBER(10,
    1), "MNTID" NUMBER(10, 1) )
    CREATE TYPE TUPTIME AS
    TABLE OF OUPTIME
    i call it this way:
    select * from table(FN_GET_RECORDS ())
    if anyone knows how to do the same in a shorter manner, tell me please.
    thanks to everybody for the help.

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

Maybe you are looking for

  • Samba cannot see vista printer(SOLVED)

    Hi.  I'm new to these forums, as far as posting anyways.  I've recently switched from Ubuntu to Arch on my laptop and everything couldn't be better.  My problem, however, lies within my Samba server.  (or so I think):/  Here is the issue: I have a de

  • Problem with a query incl. MTL_ONHAND_QUANTITIES_DETAIL and mtl_system_b

    Hi, The following query is giving me a list of products that have some quantity on stock. What I need to do, is alter the query in the way that is also shows products with 0 (zero) quantity on stock. What is the best way to approach this? p.s. I'm a

  • Monitor to TV question

    Can you find a converter that will take you monitor and plug it into a cable TV box? So that you can watch TV on your monitor?

  • Bilder werden im Organizer nicht in der chronologisch richtigen Reihenfolge angezeigt

    Hallo Ich benutze Photoshop Elements 4.0. Mit dem Organizer habe ich folgendes Problem: Meine Bilder, die ich entweder mit der Kamera über USB oder meinem internen Speicherkartenleser auf meinen PC übertrage, werden in der Thumbnaildarstellung nicht

  • Opening VI and consuming 100% CPU power

    I am trying to debug my VI. The first few times the VI ran well but suddenly the VI hang up. I have no choice but to end the LabView process using the Task Manager. When I try to restart this VI again, it fails to open and the Task Manager indicates