Calling SP that returns Out Parameters AND ResultSet

HI,
I have this stored procedure that returns not only a result set, but also OUT parameters. (I didn't write it!!).
I need to call it from Workshop. Does Databse Control allows to do that ? How ?
It seems that when it loads the out parameters in my array, the resultset is closed.
Any advice will be greatly appreciated.
Octavio

Has any one tried something like it? Could you please provide me a sample if you have done it.
I tried these options but always got errors as
[usp_return [64]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E55.An OLE DB record is available.  Source:
"Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E55  Description: "Column does not exist.".
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "usp_return" (64) returned error code 0xC0202009.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning
of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
~ Thank you so much
Regards, Avik M.

Similar Messages

  • Query or function that returns distinct values and counts

    For the following table:
    ID number
    address varchar(100)
    Where the ID is the primary key and addresses might be repeated in other rows, I'd like to write a query that returns distinct addresses and the count for the number of times the address exists in the table. What's the best way to do this? Thank you in advance.

    Jlokitz,
    select address, count(*)
    from table
    group by address;
    HTH
    Ghulam

  • Calling a function from SQL that has Out Parameters

    Hello folks,
    I am not sure if this is do-able, but here is my scenrio at hand. I have a database function that accepts a few IN parameters and OUT parameters. I want one of the Out parameters to display as part of my select statement. Is this possible?
    Thanks

    No you cannot use a function with out parameters in sql statements.
    If possible make the function return that value, then use it in select.( imean instead of OUT parameter, get that OUT parameter through RETURN)
    G.

  • Can I call a function from a dll in LabVIEW that returns:double*string and int.?

    I have a function from a dll that return a double* string and an integer. How can I call this function from LabVIEW? There is a possibility to work in LabVIEW with a double* string?

    pcbv wrote:
    > Hello all,<br><br>The header of the function is:
    >
    > "HRESULT WRAPIEnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems);"
    >
    > where WRAPI_NDIS_DEVICE have this form:
    >
    > typedef struct WRAPI_NDIS_DEVICE<br>{<br>
    > WCHAR *pDeviceName;<br>
    > WCHAR *pDeviceDescription;<br><br>}
    > WRAPI_NDIS_DEVICE;<br><br>
    >
    > The function is from WRAPI.dll, used for communication with wireless card.
    > For my application I need to call in LabVIEW this function.
    Two difficulties I can see with this.
    First the application seems to allocate the array of references
    internally and return a pointer to that array. In that case there must
    be another function which then deallocates that array again.
    Then you would need to setup the function call to have a pointer to an
    int32 number for the deviceList parameter and another pointer to int32
    one for the plItems parameter.
    Then create another function in your DLL similar to this:
    HRESULT WRAPIEnumExtractDevice(WRAPI_NDIS_DEVICE *lpDeviceList, long i,
    CHAR lpszDeviceName, LONG lenDeviceName,
    CHAR lpszDeviceDesc, LONG lenDeviceDesc)
    if (!lpDeviceList)
    return ERROR_INV_PARAMETER;
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceName, -1,
    lpszDeviceName, lenDeviceName,
    NULL, NULL);
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceDescription, -1,
    lpszDeviceDesc, lenDeviceDesc,
    NULL, NULL);
    return NO_ERROR;
    Pass the int32 you got from the first parameter of the previous call as
    a simple int32 passed by value to this function (and make sure you don't
    call this function with a higher index than (plItems - 1) returned from
    the first function.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call RFC that return structure using VB

    Hi, anyone has a sample code to call a custom RFC that returns table structure?
    The RFC expect parameters to pinpoint the record and return it in a structure.
    *Local Interface:
    IMPORTING
    VALUE(CUSTOMER) LIKE KNA1-KUNNR
    VALUE(MATERIAL) LIKE MARA-MATNR
    VALUE(POSTING_DATEFR) LIKE BKPF-BUDAT
    VALUE(POSTING_DATETO) LIKE BKPF-BUDAT
    TABLES
    SALES_VOLUME STRUCTURE ZRRPS_SALES
    Here's my vb code, but it return zero entries (I'm sure it should return records).
    ***Login Process Here***
    Set objFunc = objSAPLogon.Add("Z_CUSTOM_SALES_DATA")
    Set objSALES = objFunc.Tables("SALES_VOLUME")
    With objFunc
    .Exports("CUSTOMER") = "1234567"
    .Exports("MATERIAL") = "1234"
    .Exports("POSTING_DATEFR") = "10012005"
    .Exports("POSTING_DATETO") = "10312005"
    End With
    If Not objFunc.Call Then
    Debug.Print objFunc.Exception
    Exit Sub
    End If
    Debug.Print objSALES.RowCount ==> 0
    From here, I dont know what to do next. Am I missing something? Please help.
    Thanks in advance!
    /Noel

    Yes, the RFC developer told me to use this format mmddyyyy.
    I think the Exports portion is not working, and I dont know why. I tried remarking the Exports portion and it gives the same result, zero entries.
    Thanks!

  • Out parameters and a dynamic client

    In the 7.0 manuals for web services (http://e-docs.bea.com/wls/docs70/webServices/client.html#1011066)
    there are two examples, one for dynamic client, the other for out parameters. My
    question is there a way to use out parameters WITH the dynamic client or do you need
    a stub for it?
    Larry

    sachin
    1) make sure there is no Optional Redirect defined on the OK button. That is, make sure the page is really submitted.
    2) in the PL/SQL body generating the query, print out the query using htp.p() so you get to see it and test it.
    3) use the session state link in the developer toolbar in conjunction with the technique in step 2) to debug your query
    Maybe the report region is refreshing, but it just isn't returning any results.
    Sergio

  • How to call functions that return package local types?

    Hi everyone, I have a Pl/Sql function in a package that returns a package-local type.
    I would like to call this function from Java, but I don't know what to pass to "statement.registerOutParameter()"
    (it gives this error:
    Unable to resolve type: "XDRIVE_B2B.TEST1.MYTYPE)
    Here's the simple version with one package:
    package TESTPKG IS
    TYPE MYTYPE IS VARRAY(1) OF INTEGER;
    FUNCTION FCT2 RETURN MYTYPE;
    end;
    package body testpkg IS
    FUNCTION FCT2 RETURN MYTYPE IS
    BEGIN
    RETURN mytype(55);
    END;
    end;
    and here's the java code:
    void javatest(OracleConnection conn)
    throws SQLException
    String sql = "{ call ? = testpkg.fct2() }";
    OracleCallableStatement st =
    (OracleCallableStatement) conn.prepareCall(sql);
    st.registerOutParameter(1, OracleTypes.ARRAY, "MYUSERNAME.TESTPKG.MYTYPE");
    st.execute();
    and as I said above, the java code fails with:
    java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: "MYUSERNAME.TEST1.MYTYPE"
    I can't really have this type live outside of a package because in the real case, it's not a VARRAY(1) of integer, it's a VARRAY(1) of MYTABLE%ROWTYPE, which only seems to compile inside a package.
    thanks for any opinions,
    george moudry
    null

    JDBC, JPublisher, and SQLJ do not support PL/SQL-only types. This includes PL/SQL index tables and record types.

  • How do I assign and return out parameters

    SELECT (Pathfinder.LevelAbilityBonus.AbilityId), COUNT(Pathfinder.LevelAbilityBonus.AbilityId) as Bonus FROM Pathfinder.LevelAbilityBonus WHERE Pathfinder.LevelAbilityBonus.CharacterId = @CharacterId GROUP BY Pathfinder.LevelAbilityBonus.AbilityId RETURN @Bonus
    I'd like to assign and return the value Bonus to @Bonus.

    Hello,
    Based on your description, it seems that you want to store the query result into a variable and then return the variable. Please refer to the following statement:
    DECLARE @Bonus int
    SELECT @Bonus=COUNT(Pathfinder.LevelAbilityBonus.AbilityId)FROM Pathfinder.LevelAbilityBonus
    WHERE Pathfinder.LevelAbilityBonus.CharacterId = @CharacterId
    GROUP BY Pathfinder.LevelAbilityBonus.AbilityId
    SELECT @Bonus
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • SSIS OLE DB Source in Data Flow Task calling SP that returns variable number of column as output

    We have one old Stored Proc that I need to reuse. But that stored proc returns different number of Columns as output depending on input Parameter. Say, if I pass 1 to 9 it will return 'ID', if i pass 10 to 33 it will return 'ID', 'Name',  if I pass
    34 to 51 it will return 'ID', 'Name', 'DefaultPosition' 
    In this way.
    Now I wanted to use this in OLE DB Source in SSIS DFT. 
    During that time immediately it is picking all possible columns in Available External Columns. Even if I manually select/delete those, package is failing at Runtime, because in Runtime the parameter this will get, it should always return one & only one
    column which is ID. [Because in this package I will only have to pass parameters like, 1 or 2 or 5 or 7 or 9.
    Which in every  case should return only ID from stored proc.
    Any Idea how I can get this please?
    Regards, Avik M.

    Has any one tried something like it? Could you please provide me a sample if you have done it.
    I tried these options but always got errors as
    [usp_return [64]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E55.An OLE DB record is available.  Source:
    "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E55  Description: "Column does not exist.".
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "usp_return" (64) returned error code 0xC0202009.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning
    of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    ~ Thank you so much
    Regards, Avik M.

  • How to fix error in calling procedure that contains OUT mode variable

    Hi,
    I successfully created a following procedure.
    create or replace procedure A_three_num2
    (n_1 out number,
    n_2 in number := 2,
    n_3 in number := 3)
    as
    begin
    n_1 := n_2 + n_3;
    dbms_output.put_line (n_1);
    end;
    Then I called the procedure expecting number 8 to be displayed.
    begin
    A_three_num2(n_2=>4, n_3=>4);
    end;
    But I got an error. Would you please help me understand the problem?
    ORA-06550: line 2, column 1:
    PLS-00306: wrong number or types of arguments in call to 'A_THREE_NUM2'
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    1. begin
    2. A_three_num2(n_2=>4, n_3=>4);
    3. end;
    Thanks,
    Guy

    Try this ->
    set serveroutput on
    declare
      c_out number;
    begin
      A_three_num2(c_out,4,4);
      dbms_output.put_line('result is: '||c_out);
    end;Regards.
    Satyaki De.

  • HT203167 I have pre orderd a album that came out today and it is not in my libery and i have had no email and i am not buying it again please fix this

    I Have pre ordered a album that has been reslesed today i have had no email and it is not in my libery and i refuse to buy it again
    and i refuse to buy it again

    Pre ordered means it's not available to download immediately. You will be contacted by Apple via email when the album can be downloaded.
    Help here > iTunes Store: About Pre-orders

  • I pre- ordered an album that came out today and it says i purchased it but it did not download. what do i do?

    i pre- ordered A Day to Remembers album and it came out today, it says i purchased it but did not download. What do i do?

    Did you get the notification email? You just have to click the link on the email.

  • Calling a function from SQL prompt that returns a record

    Hi,
    I've been trying to execute a function that is present on a different database. for eg. I am loged on to a database say 'A' and trying to execute a function present in database 'B'. this function is present in a package 'X' which has 2 functions and two procedures. From the packages i am able to execute the two procedures and one of the function.
    So i guess it is not a problem with the access permissions. The function that i am trying to call say function I has got 3 OUT
    parameters and 1 IN parameter. the Function returns a record. When i try to execute this function i get an error. Can you please let me know as to how exactly i need to call this function from the SQL prompt...
    thanx in advance
    null

    Hi Anand,
    As your function has 3 OUT parameters and it returns a record you can not just call it from SQL Plus. You need to write small PL/SQL program and use variables to hold the OUT values and the returned record.
    Good Luck,
    RajKiran
    null

  • Problem with IN OUT parameters whiloe calling procedure from Form 6i

    Hi
    Could some help please? I have the following scenario.
    I am calling a stored procedure from form 6i by pressing a button on the form. Procedure has two IN OUT parameters, and I am passing these two IN OUT parameters and have declared them the way they are declared passed to the procedure. But I get an error when calling that procedure with these IN OUT parameters. the procedure works fine if parameters are IN only. The error says:
    PLS:00363: Expression '1' cannot be used as an assigment target.
    NO matter I pass some value or leave it blank, I get the same error message persistenetly.
    Please help.
    Thanks

    make sure you are calling your procedure with variables as parameters,
    i.e.
          l_v1 := 1 ;
          l_v2 := 'hello world' ;
          your_proc(l_v1, l_v2)
    not
          your_proc(1,'hello world')

  • What is the best virus remover and protector for 10.5.8 version of mac os x???          mac os x???               mac os x.  there is this thing called macprotect that keeps popping and trying get into my systemt psoror t

    what is the best virus remover and protector for 10.5.8 version of mac os x???  I  have this thing called macprotector that keeps popping up and trying to get into my computer.  I have heard of a maleware remover...

    First you do NOT I repeat DO NOT have a virus, currently there are no virus's for OS X.  This means you do not need antivirus software, if you insist on installing antivirus software then I'd recommend ClamXav. You have what is called a Trojan, the primary difference between the two is the user has to give permission for a Trojan to download and install itself. The one you got is going around right now however the good news it's quite easy to get rid of. Please read the following article for instructions.
    Malware Removal
    Roger

Maybe you are looking for

  • Javax.servlet.jsp.el.ELParseException in WLS 9.1

    I have a spring/hibernate application working fine on Tomcat. I am trying to make it work on weblogic 9.1 and get javax.servlet.jsp.el.ELParseException. Does anyone know what could be wrong? Thanks.

  • Query View.

    Hi All, I have created an BEx Query(say Report1) with following Fields In Rows: Account, status, matreial, materia start date. In coloums: Current price proposed price premium. Now i have created an view a on Bex reoprt1 whose defination is given abl

  • How do I remove Zynga and Aol toolbars from Firefox browser?

    each time I open Firefox, the Zynga and ALot tool bars open and I have to go to the view menu and un-check them. How do I permanency remove them?

  • Filter using nested keyword under certain parent

    I'm new to LR. Using LR5. How do you filter photos by using a keyword that is under a certain parent? An example of some keyword structure is: Birthday > Jenny (Photos from Jenny's Birthday) People > Jenny (Photos that have Jenny in them) I want to s

  • Cursors turn into cross-hairs sometimes.

    I have Adobe Photoshop CS4. My pen tool and paint brush tool cursors turn into hard-to-see cross-hairs sometimes. It makes my work more difficult and strains my eyes and give me a headache. How does it do that in the first place and how do I fix it?