Should I use OracleCallableStatement to treat a REFCURSOR?

Oracle 10g 2 Rel using last Oracle thin driver on a Java 1.5 application.

I'm porting of our existing application to Oracle, but for the next few months, I do need to support several databases (SQL Server, DB2) with the same line of code. Our db access layer is stored procs wrapped in CallableStatements according to which a large majority returns a set of results. I so need to continue to use the ResultSet objects and existing java.sql.CallableStatements.

A typical stored proc looks like this:

CREATE OR REPLACE PROCEDURE getMeData
(
v_c_columnname IN VARCHAR2 DEFAULT NULL,
v_intSort IN the DEFAULT NUMBER 0.
cv_1 IN OUT SYS_REFCURSOR
)
AS
BEGIN
OPEN FOR Cv_1
SELECT col1,
col2,
COL3
FROM someTable
WHERE somecolumn = v_c_columnname;

END;
/

We have summarized currently calls stored procedure by doing a check on which db platform, then wrapping with either EXEC or dial the CALL and the construction of the proc for the target RDBMS.

My first question is: is it possible for me to handle/process the REFCURSOR back in java.sql.Callable vanilla games/statement of results, or if I have to use oracle.jdbc.CallableStatment (and save the output cursor type (IE, cStmt.registerOutParameter (3, OracleTypes.CURSOR)?))

Second question - I'm currently testing with the OracleCallableStatement, but my cStmt.execute will simply ignore the call of execute - I know its built correctly, and when I call via pl/sql with the dregs, it returns correctly, so am I missing something in the way of treating the REFCURSOR? It is not fails with an Oracle error, it's just not executing.

It's the call:
begin getMeData(?,?,?); end;

Last question - must use a REFCURSOR to return a result set via PL/SQL stored procs, or is there another way?

TIA

right. She must be from an Oracle driver to work
with JDBC Oracle oracle-specific characteristic examples.

Tags: Oracle

Similar Questions

  • What field / class should I use to create a mobile rectangle?

    Hello

    I want to create a rectangle that people can focus on, and when it's to the point, people can scroll to the left or right to move the rectangle left and right. What field or the object or the class should I use?

    Thank you!

    I noticed that too.  However, since the BB is double buffered, I'm not sure you save anything in fact.  As you move your rectangle, you would have to redraw where it was anyway.

    This treatment is all done in the paint of the screen method so effectively treats the screen as a large Bitmap.

    If you have created a field for yourself, you could add that field to a Manager, then use this Manager to place this field on the screen and then move.  In fact, it would be fairly simple.  But to do this, you must create a manager who knew how to move the field, then move the field whenever you wanted to move.  Then painting everything would be done by another person (i.e. the Manager and the field.)  In my opinion, costs, overhead and complication just to draw a rectangle of mobile, is excessive.  However if you plan to put different data in the Rectangle, such as text and therefore might want to use a real field of BB to help with its interior design.  To help you with this, I suggest you only consider these three KB articles:

    What is - BlackBerry UI hierarchy
    Article number: DB-00111
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...
     
    -How to create a custom handler for a screen presentation
    Article number: DB-00117
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

    -Creating custom fields
    Article number: DB-00120
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/...

  • Hello. I need to know what Add on specific advise you I should I use to block pop up ads. Be very specific.

    Hello. I need to know what Add on specific advise you I should I use to block pop up ads. Be very specific.
    In other words, please tell me that pop-up blocker is safe to use and will fit very well with features of Firefox.
    Thank you
    Kind regards
    Alfred

    Firefox has a built-in pop-up Blocker.

    For everything else:

    https://addons.Mozilla.org/en-us/Firefox/addon/Adblock-Plus/

  • What port mini display of brand to HDMI cable should I use?

    What port mini display of brand to HDMI cable should I use?

    Besides Apple, Belkin seems to have good reviews.

    Ciao.

  • What is the difference between Firefox and Namoroka 64-bit? I have a 64-bit computer. Which should I use?

    What is the difference between Firefox and Namoroka 64-bit?
    I have a 64-bit computer. Which should I use?

    The officially supported only is Firefox - which is your best choice, unless you want to test the new features...

    http://www.Mozilla.org/en-us/Firefox/new/

  • Under which community should I use for apple store questions?

    Under which community should I use for apple store questions?

    I need to get my Bill for a 5s iphone that is more than 18 months.

  • I can't use a website should I use with Firefox 5.0. So, I need to uninstall and go back to 3.5 or 3.6. Please notify. Also, my control panel blocks from Windows Explorer a PMP. That's why I use Firefox instead. Thanks for any help!

    I can't use a website should I use with Firefox 5.0. So, I need to uninstall and go back to 3.5 or 3.6. Please notify. Also, my control panel blocks from Windows Explorer a PMP. That's why I use Firefox instead. Thanks for any help!

    I thought it would be FAFSA is causing your problem.

    Install Portable Firefox 3.6.x on your hard drive to a Web site. This will not affect any of your current Firefox installation.

    http://PortableApps.com/apps/Internet/firefox_portable/localization#legacy36

  • Should I use Windows update for updates or download Toshiba bullet only?

    Hello

    I have Toshiba Satellite laptop computer with Windows XP. I wonder what should I use windows update to download patches and additions or only
    install quick fix from the Toshiba support pages? Is there a difference?

    I noticed that to the Toshiba support site, there is no new update (miracles) have come in this year at all.

    I ask this because I have some time ago asked Toshiba (when I contacted their support) I use only WLAN updates provided by Toshiba, Intel does not update even if I have the Intel WLAN card in my laptop and there was new driver at the side of Intel.

    I agree with the previous user. I never installed all the patches page download Toshiba, just used Windows Update option in Explorer. So far, I've never noticed some problems.

    If you clean the OS installation I recommend you to install SP2 (if missing) and after doing this run Windows updates.

    I can't tell you much on Intel, but I repeatedly used newer drivers directly from the Intel download page.

  • Satellite L500-19 X - what speed of DVD should I use?

    Having just bought a laptop, as above I am faced the question of how fast DVD to use.
    John Lewis PC after sales help service advised me that time 16 DVD sometimes causes trouble and I should get 8 X and use them if possible even if they say they are now almost as rare a hens teeth. Say them a 16 X can be OK but X 8 would be more reliable.

    I have not started my laptop but as am waiting for supply of X 8 I found on Ebay as recommended DVD-R NOT + should be used. I see that the disc tray is marked rewritable + leading to more confusion.

    Make a copy of the operating system upon receipt of the X 8 and not before.

    All advice or comments would be most appreciated

    For a long time, I always use the same DVD and I have never, but never really noticed some problems burning, especially not to create recovery media.
    I use TDK DVD-R 1-16 x speed empty media.

  • What function key should I use for the option about bootcamp

    Function key WWhat should I use to open option of bootcamp

    If you try to open the Bootcamp application, simply search for it featured in the top right corner.

    If you have already installed Windows and try to start Windows, turn off the computer and then turn it back on by holding the Option key. It should show unity of Bootcamp and the Macintosh HD.

  • Satellite A200 - 23Q PSAE6E - what SATA driver should be used with Vista Pro

    What SATA driver for toshiba Satellite A200 - 23Q PSAE6E should be used for Vista is.

    Where can I find.

    Hello

    You need the Intel Matrix Storage Manger.
    This package contains the SATA drivers.

    Here is a link to the page from Intel:
    [Intel® Matrix Storage Manager | http://downloadcenter.intel.com/Product_Filter.aspx?ProductID=2101]

    Concerning

  • Can I string my new imac to 2015 to my imac 2007. What cable should I use (read: I'm illiterate cable).

    Can I string my new iMac to 2015 to my iMac 2007. What cable should I use (read: I'm illiterate cable).

    Hi, Daisy Chain in what way, exactly, do you mean so the iMac 2007 may be in target disk Mode so the newest can use its drive?

    If so, you need a lightning to Firewire adapter...

    http://www.Apple.com/shop/product/MD464LL/A/Apple-Thunderbolt-to-FireWire-ADAPTE r

    And a FW/800<->FW800 cable...

    http://eShop.MacSales.com/item/NewerTech/1394B99036/

  • What should I use: Stand by or hibernation mode?

    What is the general Council concerning power options - should I use (default) stand-by, hibernation or shutdown. This could be for 1 hour or overnight.

    I just used stand-by but sometimes all night I hear the hard disk activity.

    I was wondering the general consensus.

    Thank you

    Hello

    Something this two modes:

    Sleep and modes extended recording the State of the computer when it off s. The next time the unit is turn on, the data will be retrieved and the computer's User Interface will appear exactly how it was when it was turned off.

    The difference between the standby and Hibernation mode is the method of saving the State of the system data:
    -in standby mode, the RAM is used to save the State of the data, and therefore, the RAM is always fed in order to maintain the saved state.
    -in hibernation mode, the State of data is saved on the hard disk, in a special file called Toshiber.dat.

    Standby mode keeps the saved state of the computer for only a few days, that is until the battery is empty.
    Hibernation can persist the State of the data indefinitely, but start and stop times are longer than with the Standby mode and require more energy while saving and recovery of State data.

  • Which driver should be used to connect HP 34401 using RS 232

    Hello

    I'm using labview for the first time. I want to use the RS 232 cable to connect between Labview and HP 34401 multimeter. Which driver should be used for this purpose? Help, please.

    Thanks in advance!

    A search for the HP 34401A on the Instrument Driver Network reveals this page, which should have what you need. If you're using LabVIEW, you will want one of the first two projects.

    Also, for future reference, this board is for NI DMMs. For future instrument driver assistance, you will receive more timely and expert information on NI's Instrument Control forum.

    Please let us know if you require any further assistance.

    Thank you,

    Tobias
    Software Engineer
    Precision DC/Modular Instruments
    National Instruments

  • When should I use the IRIS PRO that came with my 8600 instead of the built-in OCR scan-to-text?

    I just bought the Premium Pro 8600.  I installed the HP software, that gives me an OCR option for scanning.  I also installed the second disc, IRIS PRO, which is OCR, too.  When should I use each?

    I would use the software OCR supplied with the printer during the formatting of the document to be scanned is simple and use the IRIS PRO when the formatting is more complex.  You should expect some distortion of the two programs well formatted.  Hope that helps.

Maybe you are looking for