BC4J - How can I get java.sql.Connection ?

Hi,
I am using BC4J for my Application and want to get the java.sql.Connection from ApplicationModule or from anywhere such that I can use the same connection as in ApplicaitonModule, to do some work in the database.
I tried to get it from the SessionInfo :
sessioninfo.getConnectionInfo();
but this returns me oracle.dacf.dataset.connections.Connection
How can I convert this to java.sql.Connection?
Or Is there any other means to get hold of sql.Connection?
Any help would be appreciated.
TIA

Thanks for this reply.. but
I need java.sql.Connection to call a stored procedure in Oracle database and I have to pass oracle.sql.ARRAY to it.
My Stored Procedure looks like:
create or replace PROCEDURE updateRevenueNetworkInfo(revid varchar2, netids Varchar32Array)
where 'Varchar32Array' is my own datatype in the database which is mapped to oracle.sql.ARRAY object in java.
And in order to create oracle.sql.ARRAY I need java.sql.Connection as shown below
oracle.sql.ARRAY pTable = new oracle.sql.ARRAY(desc, connection, netidarray);
I am executing my stored procedure like this:
ArrayDescriptor desc = null; CallableStatement cs = null;
String[] netidarray = {"00-AOL-T1-N003"};
desc = ArrayDescriptor.createDescriptor("VARCHAR32ARRAY", conn);
oracle.sql.ARRAY pTable = new ARRAY(desc, connection, netidarray);
cs = conn.prepareCall( "BEGIN updaterevenuenetworkinfo(?,?); END;" );
((OracleCallableStatement)cs).setString(1,"00-AOL-T1-R3");
((OracleCallableStatement)cs).setArray(2, pTable);
cs.execute();
Is there any way of getting java.sql.Connection such that I can use the same connection as in the ApplicationModule?
OR Is there any other way of passing Array of Strings to a stored procedure in the database?
Thanks for the help.
null

Similar Messages

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

  • How can I get an automatic connection to wifi on startup?

    We lost internet connection during snow/ice storm. I have to manually connect to wifi now. How can I get an automatic connection to wifi?

    An 'uninterruptible power supply' that automatically steps in and takes your computer
    off the grid momentarily, will work in cases of brown-out (under-power) & surge (spike)
    and it does so at a fast rate. Most of these also offer a way to customize sensitivity to
    a certain degree, depending on model and should there be a valid reason to do so.
    An old-school surge protector, even if it has a few fancy LEDs, is no protection. And
    for less than a replacement logic board or an hour of authorized Apple repair, the UPS
    is a fairly good investment. Backup battery is user-replaceable in the better made units.
    Most of them offer extra ports that do not use the battery-backup power feature. If you
    need to have more items run when the power switches up/down or out, you'd need to
    consider a larger capacity backup power unit. In some instances, the makers of these
    (for a time, perhaps even now) did caution users to not install more than one UPS per
    room when the same leg may have inadequate grounding, since these can dump the
    excess surge power from several different UPS units and overload the ground.
    That said, the gamble is yours. I've found to have and use these is some protection
    and when away from the computer. Most settings for controlling them appear in OS X.
    No additional software is required. Other settings may be on the UPS front panel.
    Good luck & happy computing!

  • How can I get Java plugin to work

    How can I get Java plugin to work ?

    Greetings Dun1203,
    Welcome to the Apple Support Communities!
    I understand that you would like to install or update Java on your Mac. For information on this process, please use the information provided in the attached link. 
    Java updates available for OS X on August 28, 2013 - Apple Support
    Cheers,
    Joe

  • How can I get Java to fill out form on web page and submit?

    I need to write a Java program that will submit a HTML form. I tried using POST already, but the only response I got back was the source code for the page itself. Looking more closely, I realized that there is a PHP script that will actually take the data from the forms and use it. How can I get Java to enter the data on the forms automatically and then run this PHP script? I don't need code, just a pointer in the right direction should do.
    Thanks in advance,
    Hasitha D

    hasithad314 wrote:
    I need to write a Java program that will submit a HTML form. I tried using POST already, but the only response I got back was the source code for the page itself. Looking more closely, I realized that there is a PHP script that will actually take the data from the forms and use it. How can I get Java to enter the data on the forms automatically and then run this PHP script? I don't need code, just a pointer in the right direction should do.
    If you are writing a program to submit a form,how come the PHP script come out of nowhere ? At this momemnt you are just writing some Java program,isn;t it ?
    My feeling is you are trying to edit some pre-written code.
    Is it ?
    Thanks.

  • My itouch wont connect to the wifi but my laptop will. How can I get it to connect?

    My itouch wont connect to the wifi but my laptop will. How can I get it to connect?

    What happens when you ry to connect? Error messages?
    Does the iPod connect to other networks?
    See:
    iOS: Troubleshooting Wi-Fi networks and connections

  • How to check whether java.sql.Connection has been dropped or not

    Hi,
    How can i check whether the connection is dropped from the database or not by using java.sql.Connection API.
    Thanks

    There's a few ways to check Connections, each with a different use:
    (1) conn.isOpen()
    (2) conn == null
    (3) the last one is a little more involved and adds some overhead. You can run SELECT 1 FROM dual; (Oracle) or SELECT 1 (MSSQL) and check for exceptions.
    The only way to check a connection, as far as I know, is to use it. That said, there must be a better way???

  • How can i get the SQL of a tablespace from the database

    Hello All,
    I am using Oracle 11g R2. I want to get the SQL of some tablespaces on my database. in the same way i get the DDL of the table using the GET_DDL function.
    How can i get that ?
    Regards,

    try this please
    select dbms_metadata.get_ddl('TABLESPACE',tb.tablespace_name) from dba_tablespaces tb;or
    select 'create tablespace ' || df.tablespace_name || chr(10)
    || ' datafile ''' || df.file_name || ''' size ' || df.bytes
    || decode(autoextensible,'N',null, chr(10) || ' autoextend on maxsize '
    || maxbytes)
    || chr(10)
    || 'default storage ( initial ' || initial_extent
    || decode (next_extent, null, null, ' next ' || next_extent )
    || ' minextents ' || min_extents
    || ' maxextents ' ||  decode(max_extents,'2147483645','unlimited',max_extents)
    || ') ;'
    from dba_data_files df, dba_tablespaces t
    where df.tablespace_name=t.tablespace_name Edited by: Mahir M. Quluzade on Mar 14, 2011 4:51 PM

  • BC4J HOW Can I GET the CONNECTION String

    hi everyone
    I'm using Jdev 3.2. In my BC4J prooject I want to get the current connection String used by the application module to connect to database.
    can some one help me please.
    Ghassen

    I don't know what's really the problem, but I recomplie the same code and I receive the same error.
    I added also the import statement: import oracle.dacf.dataset.connections.NamedConnection.
    and I receive the same error message.
    can that be a mising library problem?
    ghassen
    null

  • How can i import java.sql package for midlet development

    I am trying to write a midlet app using Wireless Toolkit 2.5.2. I would like to connect my application to JavaDB in embedded mode. But when I write "import java.sql.*;", I get an error "package java.sql does not exist
    ". I would like to know how can i include this package. please help.

    FBL wrote:
    Sorry to jump in, but isn't there limited jdbc using unconventional methods?
    [http://developers.sun.com/mobility/configurations/articles/cdc/jdbc/|http://developers.sun.com/mobility/configurations/articles/cdc/jdbc/]
    If so, I feel this may better answer the OPs question.
    -TresAbove article refers to CDC - it is useless in CLDC midlets

  • Hey..... i have a problem with my phone to use wifi ...first no WiFi appears to be in range and i just discovered that it only connects to wifi when im next to the router....the question is how can i get it to connect without being next to the router??

    WHATS WRONG? OR HOW CAN I CONNECT MY PHONE TO WIFI WITHOUT IT BEING NEXT TO THE ROUTER ALL THE TIME?

    Then it's likely that you have a hardware issue on your hands. Follow the three r's:
    1. Restart: Turn it off and then on again
    2. Reset: Hold down the home and power button until the apple logo appears
    3. Restore: Connect the device to iTunes and restore it as new. Test the issue and see if it persists.
    Don't forget to back up before you restore, so you can keep your data.
    If the three r's don't work to solve your issue, you will need to get your phone repaired. To do this, you can go into the apple store or call 1-800-275-2273.

  • I downloaded mountain lion and it updated my java to 1.6 and i need 1.5 for work, how can i get java 1.5 back

    How can I dowload and use java 1.5 and not the new 1.6 that comes with mountain lion

    First, download the version of Java you need. Then, go into Applications > Utilites > Java Preferences. Under the general tab you choose which version you'd like to use by checking or unchecking the versions installed.

  • I have dial-up internet service an use hypernet with my service,Firefox does not recogize the hypernet how can I get them to connect?

    Kcnet provides a Hypernet to help with my dial-up service,Firefox doesn't allow the hypernet to work,how can I make this work.

    AirPort Express 3 is not actually "extending" the network at all, since Apple's "Extend a wireless network" will only allow the wireless signal to be extended one time or one level.
    The trick with AirPort Express 3.....which may nor may not be possible due to your home layout.....is that AirPort Express 3 must be about the same distance from Big AirPort as AirPort Express 1 and 2.......AND......it needs to be closer to Big AirPort than it is to either AirPort Express 1 and 2.
    That way AirPort 3 will pick up a stronger signal from Big AirPort and it extend the network correctly.

  • How can i get a VGA connection?  I cant find the right cables?

    i wish to get a VGA connection for a Projector or stuff like that? I looked on the apple site for a cable but cant find one that has the right port for my computer... any ideas?  i have a new Macbook Pro.

    Hi tjk,
    I am taking advantage of clump´s post, but I have an issue with the following. I looked in my local retailer recently for a DVI to  HDMI adapter... but they are out of stock. I need to plug my MacBook Pro to my TV, and then I have a DVi to VGA adapter, and my TV (Sharp Aquous LCD) has an analog PC connection. I tried to see my desktop in the TV, but the TV is not recognizing the Mac... do you if it is feasible to have the TV recognize the Mac through a DVI to VGA adapter?

  • How can I get airport to connect automatically to wireless network?

    I temporarily switched from a DSL internet provider to a cable provider, and then back to my old DSL Internet provider. My g5 iMac computer connects to the network through a wireless Belkin router.
    Since I switched Internet providers, every time I turn on my computer, it no longer automatically connects into the wireless network. Instead, to connect I now have to manually select the network.
    I'd really appreciate tips on automating this step. My kids use this computer and due to parental restrictions, they do not have rights to connect to the network.

    Hi there,
    Strictly speaking changing how the internet is coming into the wireless router should not affect the wireless and how machines connect to it, but however to get you out of a hole I would say create a new Location for your home and start again.
    Basically,Disable your wireless first, then in your network settings there is a drop down box at the top of the panel where you can change and create new locations. Create a new one, then select it and click Apply. Now enable your airport and connect to the wireless, once that is done you should be good to go.
    Hope that helps,
    Callaghan001

Maybe you are looking for

  • Adobe Download Assistant stuck on "Extracting"

    Yesterday I tried to download the Creative Suite Master Collection trial for school, I have a key gen license from my school to enter once the trial product is downloaded. Im using a mac book pro Lion 10.7.2. It took a few hours to download and then

  • PDF/X-1

    Hello I have created a PDF using PDF/x-1a:2001 Adobe PDF Settings. When i preflight this is Acrobat the Generated `report shows PDF/X version = PDF/X-1:2001 PDF Conformace level =PDF/X1a:2001 Why does the the Generated report from the PReflight show

  • !!! Statements of Logic Deleting Files and messing with System are True !!!

    This morning I answered some guys post about Logic deleting everything in the same level as the project folder under certain circumstances. I Tried trouble shooting for him but could not recreate it. Then this happened to me today: When working in Lo

  • "Save As" in created PDF

    Hello everyone, I am fairly new to using LiveCycle Designer. I've got about a week of experience under my belt here, and I've made a few different PDF forms. One in particular, is a 2 page form that will be used by my co-workers as a general work for

  • Just joined and tried to "quit" Creative Cloud and message pops up...

    --Quitting will cancel any application installations-- Remaining signed into Creative Cloud a requirement?