Can you get values back from a stored procedure via OUTPUT parameters?

Can you get values back from calling a stored procedure via OUTPUT parameters/variables? I call the SP via a SQL statement from a script either in a WF or DF.
I thought I read some reference that DI could not get the values from OUTPUT parameters but I could not find it again (don't know if it is in any of the documentation or referred to in a forum.
I did try a couple of tests but it did not reutrn any values via OUTPUT. But before I give up I thought I'd see if you could and maybe I needed to change something.

This isn't exactly an answer to your question, but I'll point out that, given that you're resorting to a SQL script in the first place, there's no reason you can't also turn the output parameters into a regular result or record set. (The following uses T-SQL, although I think it's pretty generic.)
declare @param1 int, param2 varchar(100), @return int;
exec @return = proc @param1 = @param1 output, @param2 = @param2 output;
select @param1 as param1, @param2 as param2;
That is, to get from output parameters to a "regular" output from the SQL script isn't much of a leap...
Jeff Prenevost
BI Consultant
Ann Arbor, MI

Similar Messages

  • HT3787 If you accidentally eject that local file (plain white disk image) from another user, can you get it back?

    If you accidentally eject local file from mobile me from another user, how can you get it back? Or is it stored somewhere else????
    My website was saved on there. And I need it!!
    I didn't realize that was the idisk since mobileme has been gone for so long.

    That's what I was hoping.  I use Time Machine to back up the entire computer.  But I'm assuming it was a disk image, and that wouldn't be saved on the backup?  Or where could I find it?

  • HT5833 What happens if you remove a profile from ipad? Can you get it back?

    What happens if you remove a profile from iPad? Can you get it back?

    Hi Gumby694,
    You can only get the profile back if you plug into a computer that has the configuration profile in Apple Configurator or get the profile wirelessly from an MDM.
    Hope this answers your question.
    ~Joe

  • Getting values from a stored procedure with no parameters

    Hi,
    I'm trying to get values out of a stored procedure that I created on SQL server. I'm trying to get XML values out of the database, but I'm not sure how to get any data out of it written to a file if the procedure doesn't have any parameters.
    So I'm just making a call:
    CallableStatement cs = conn.prepareCall("{call myproc}");
    cs.execute();How do I get values back from this stage?
    Thank you very much,
    Lior

    The short form answer, which assumes that the stored procedure is returning the XML as an out parameter would go something like this.
         public void build(String newUserID, String newPassword) throws SQLException {
              String sql = "{ call GET_ITEM_DETAIL(?, ?, ?, ?, ?, ?) }" ;
              try{
                   init(newUserID, newPassword) ;
                   setCallableStatement(getConnection().prepareCall(sql)) ;
                   getCallableStatement().setInt(1, getItemNumber()) ;
                   getCallableStatement().registerOutParameter(2, oracle.jdbc.driver.OracleTypes.CURSOR) ;
                   getCallableStatement().registerOutParameter(3, oracle.jdbc.driver.OracleTypes.INTEGER) ;
                   getCallableStatement().registerOutParameter(4, oracle.jdbc.driver.OracleTypes.VARCHAR);
                   getCallableStatement().registerOutParameter(5, oracle.jdbc.driver.OracleTypes.VARCHAR) ;
                   getCallableStatement().registerOutParameter(6, oracle.jdbc.driver.OracleTypes.VARCHAR) ;
                   getCallableStatement().execute() ;
                   setSqlResult(getCallableStatement().getInt(3)) ;
                   setSqlMessage(getCallableStatement().getString(4)) ;
                   if( getSqlResult() != 0 ){
                        throw new SQLException(getSqlMessage(), null, getSqlResult()) ;
                   setResultSet((java.sql.ResultSet) getCallableStatement().getObject(2)) ;
                   if( getResultSet() != null ){
                        while( getResultSet().next() ){
                             setItemType(getResultSet().getString("ITEM_TYPE")) ;
                             setItemValue(getResultSet().getString("ITEM_VAL")) ;
                             setDisplayType(getCallableStatement().getString(5)) ;
                             setDisplaySize(Integer.parseInt(getCallableStatement().getString(6))) ;
              catch(SQLException e){
                   java.util.Date now = new java.util.Date() ;
                   java.text.DateFormat format = java.text.DateFormat.getInstance() ;
                   setSqlMessage( e.getClass().getName() + " : " + format.format(now) + " : " + e.getMessage() + " : IN " + getClass().getName() ) ;
                   System.err.println(getSqlMessage()) ;
                   throw e ;
              finally{
                   closeResources() ;
         }The GET_ITEM_DETAIL stored procedure returns several out parameters of various types. The code registers them as out parameters along with an anticipated type and then calls the getXXX(n) method that corresponds with that data type in the appropriate position.
    As I mentioned in my other post, the onus of returning the XML is on the stored procedure, when you get it into Java it's going to be a java.lang.String that you can then parse by whatever means is appropriate to your situation.
    Regards,

  • I updated my iPad to ios 6.1 and now all my notes are gone.  Can you get them back?

    I updated my I pad to iOS 6.1 and now all my notes are gone.  Can you get them back?

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Offand, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds). Ignore the "Slide to power off"
    If these do not solve the problem you can restore from a current iTunes or iCloud backup.

  • If you gotten your ipod, ipad, etc. stolen how can you get it back?

    If you gotten your ipod stolen how can you get it back?

    - I you had turn on the FindMyiPod feature than you can go to icloud.com, log in and go to FindMyiPhone you may be able to locate it if wifi is on. However, that can be disabled by turning it off or restoring the iPod
    - Otherwise, just the old fashiponed way. Apple will not help
    Reporting a lost or stolen Apple product
    - Change the passwords for all accounts used on the iPod. Report it to the police.

  • If someone hid your ipodtouch how can you get it back

    if someone hid your ipodtouch how can you get it back or find it?

    How would you find or get back anything else that you lost?
    Do that.
    IF you set up find my ipod on the ipod itself BEFORE it was lost AND it is on AND it is connected to wi-fi, then you may be able to get an approximate street address using icloud.
    Otherwise, there is no way to track it.

  • How can I get the printed message of stored procedure in JPA

    Hi, I'm using JPA to invoke stored procedure in database, a segment of the sproc is like below:
    if @create_type != 'a1' and @create_type != 'a'
         begin
         print 'create type must be either ''a1'' if you pass in A1 ID, or ''a'' if you pass in User ID'
         select 0 as "Result"
         endI can get the 0 as the result, it means business operation failed currently, but how could I get the message of 'create type must be either ''a1'' if you pass in A1 ID, or ''a'' if you pass in User ID'?
    That information is important as it indicates why the operation failed.
    Thanks

    how can i get rows count returned by stored procedure in oracle sql developer?
    Procedures do NOT return a value - functions return a value.
    A procedure executes whatever code it contains. That code could contain many queries that produce many row counts.
    Does your procedure take one or more IN, OUT or IN OUT parameters?
    See example 8-1 for an example of executing a procedure that has an OUT parameter.
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/subprograms.htm#CHDBIEEE

  • How can you get something back you've deleted from trash

    I was in the process of formatting my external drive so I could use it as the backup drive for my MacBook Pro.  It wanted to format it, so I took my files from the external drive and saved them to the desktop of my computer.  When it was done formatting, I transferred the files back to my drive and then deleted the files from my desktop and trash.  I went into the folders on my drive today and they are empty.  So I need to find out how to get something back from my trash can that's already been emptied!!

    You can't, without the use off a third-party file rescue app or third-party file rescue service. You can try this:
    http://www.prosofteng.com/

  • HT1766 If I have accidently deleted my music files from iTunes on my PC laptop, can I get them back from my iPad which was synced just before I deleted all the files?

    I accidently deletes all my music files from iTunes on my PC laptop. Can I get them back using my iPad mini Retina that was synced just before I deleted the files? I am a bit old fashioned, so all of my music has been imported from my CD,s, not purchased from iTunes store. I could re-import, but almost 5,000 songs. Especially when they are sitting there on the iPad.

    Yes, if they were purchased from iTunes.  If they were CD's you copied to your iTunes library, then synced to your iPad, you may be forced to redownload the CDs again.
    Connect your iPad to your computer via USB and with iTunes open wait for your iPad to recognized on the left side of the iTunes screen.  Right click your iPad once and a dialog box will apear.  Choose Transfer Purchases and the music apps, etc., you purchased will transfer to your iTunes library on your computer.

  • When i am on my home screen or locked screen, my battery usage and service toolbar has disappeared. How can you get it back?

    when i am on my home screen or locked screen, my battery usage and service toolbar has disappeared. How can i get it back?

    Yeah there's no setting for that. So either you don't have an iPhone, or your iPhone is jail broken. If it's jail broken, just restore to factory and all will be fixed :)

  • How can you get your files from outlook onto your ipad2 and keep it in the files?, how can you get your files from outlook onto your ipad2 and keep it in the files?

    How can you get files from your outlook folder from the ipad2 and keep it there for future reference?

    It's unclear what you are asking outlook is a mail, appointment, tasks and contacts
    Programs outlook have no direct contact with files

  • If you buy an IPad online would it have an Apple warranty and can you get extended warranty from Apple

    If you buy an iPad online would it have an Apple warranty. Can you get extended warranty?

    If you buy it from the Apple Online store yes it will have full 1 year warranty, and the possibility to directly buy Apple Care +.
    If you buy it from somewhere else, it may not. If the online seller is not an Apple authorized reseller then you may need to take to to an Apple Store for physical inspection before purchasing the Apple Care Plus extension.
    If its not sealed and new, the warranty timer may have started to elapse, and it may not be eligible for Apple Care +.
    But without knowing where you plan to buy it its hard to say for sure.

  • Just deleted a video by accident.can I get it back from iCloud.all my iCloud settings and photos under settings was switched on.thanks

    Just deleted a video on my iPhone 5 by accident.can I get it back. I have iCloud and was all switched on under my settings.thanks;)

    Welcome to the Apple Community.
    If you have a back up with the video on, you'll need to restore your phone, if so is your back up in iTunes or iCloud.

  • If you saved your photos to a computer can you get them back on your phone?

    i saved all my photos to my computer for space but now i want them back on my phone how can i get thme back?

    synch them back.  This very, very basic function is detailed in the User Guide.

Maybe you are looking for

  • Awful GPS on Nokia E6

    Dear Nokia Team! If you are reading this please do something with the integrated GPS. Why did you include in the phone if it doesn't work. At least if it's a need in time to get the positioning then tell me how much time does the GPS need to get the

  • Firewire to Thunderbolt connectivity

    Hi there. I have a thunderbolt to firewire adapter but the firewire connection on the adapter is different to the one on the firewire lead (supplied by focusrite). Are there different firewire connections?

  • REF cursor with special characters

    Hi all, I want to display the record set using ref cursor. I am passing varchar field as parameter. How to give this in where cluase of select statement. i want to use like %parameter_name% in where condition. How to use it in ref cursor. Thanks in a

  • Best practice for creating test classes

    I am quite new to java using NetBeans 6.1 with JDK 1.6 and for some of the functions I created I want to write test classes to run automated tests to check consistence when I do some changes. I read something about this topic getting confused about d

  • Logic 9 with Axiom 25 and Roland VS100 issues

    Im trying to help a friend with his setup. He has : Logic 9 MacBookPro Roland VS100 I/O Axiom 25 1st gen controller Ive got him so that the VS 100 gives him the audio and transport functions. Roland US had a Controller Plugin for this that loads work