How to use the current connection when the db procedure call?

Hi all

Use Jdevleoper 11.1.1.3.

I have a java class that calls a database procedure, now everything is fine with me, but a little slow because am open a new connection, I think it would be certainly faster if the current connection is using
so, how can I re - write my code so I can use the istead of connection today to define a new connection to the DB:

public void DeleteApp (int PAppNo) {}
String username, password, thinConn;
username = "ACC";
password = "ACC";
thinConn = "JDBC: thin: @...» »
try {}
DriverManager.registerDriver new (OracleDriver());
Connection Conn = DriverManager.getConnection (thinConn, username, password);
CallableStatement cs = conn.prepareCall ("{call myprocedure(?,?,?)}");
cs.setInt(1,PAppNo);
....
}

Thanks for all,
MaLa

I would like here...

A big problem, it's that you must hard code connection information into the user interface. No change to a different DB server configure it without changing the code and redeployed.

Next, why don't you put method in the module of the application and call it? This will keep the valid MVC pattern.

Timo

Tags: Java

Similar Questions

  • How to use the node to call a library function to convert C++ source codes

    Hi all

    There are two dll name 'QMSL_WLAN_Transport.dll' and 'QCAMSL_MSVC10R.dll' and some codes c ++ to connect to the DUT. The two DLLs work together for communicaite with the DUT.

    I am confused as how to use the node to call a library function to load the 'QCAMSL_MSVC10R.dll' function as

    g_hResourceContext = QLIB_ConnectServer_UserDefinedTransport((HANDLE) USER_HANDLE,
    UserDefinedSend,
    UserDefinedReceive,
    UserDefinedFlushTxRx,
    true,
    true);
    

    It seems that 'UserDefinedReceive, UserDefinedSend, UserDefinedFlushTxRx' Processaddress?  And "UserDefinedReceive, UserDefinedSend, UserDefinedFlushTxRx"'s functions in 'QMSL_WLAN_Transport.dll '.

    UserDefinedReceive = (_UserDefinedReceive)GetProcAddress(hUDT,"UserDefinedReceive");
    UserDefinedSend = (_UserDefinedSend)GetProcAddress(hUDT,"UserDefinedSend");
    UserDefinedFlushTxRx = (_UserDefinedFlushTxRx)GetProcAddress(hUDT,"UserDefinedFlushTxRx");
    

    Attached DLLs and C++ code snippets.

    Need help.

    Thank you.

    These parameters are reminders - pointers to functions that are called by the DLL - and there is no way to duplicate this purely in LabVIEW. Search this forum for the word "recall" and you will find similar questions (for other DLLs). You will need to write your own DLL (in C, C++, etc.) that implements these functions and provides a way to transfer data to LabVIEW.

  • How to use the node function call library for a function in the dll with the data SUB type

    Hi all

    I would ask for your kind help

    I am facing a problem with the call library node.

    I have a C++ (stdcall) function, which has Sub as data type

    XXXX error code (hwnd, lid, getValue, * Sub data1, * Sub data2)

    data1 and data2 types are constantly changing based on the value of 'getValue '.

    Mainly I can use the call library node several times and adapt each node according to the types of data data1, data2 and extract the values and use in the code. Here is no question. Real question is:

    My question:

    How can I use a node of library time call and make a case according to the 'getvalue', who will control the data1, data2 data type. Here I really seeking solutions.

    My tests:

    I used varaints as entry to the libray call node of the data1, data2 and selected parameters in the call libraby node as "Adapt to type. Here labview just crashed.

    I appreciate your suggestions to feedbackand.

    Thank you

    Karine

    You must allocate enough space for data1 and data2, and then pass a pointer to this space. An easy way to do this is the function to initialize table. Set the U8 type and size for the number of bytes required. Pass this array to the function as a pointer of table data.

    After the function call returns, you need to extract the data in the table. You can do it manually, but a simple approach is to use the array of bytes to a string. Then, in a housing structure, use Unflatten chain to convert the string to the correct data type. This method also converts the "endianness" which will be probably necessary; Be sure to only set all entries for unflatten correctly.

  • Satellite P300-133 - how to use the internet connection via BlueTooth

    Hello

    I finally solve my problem with the synchronization via bluetooth between my P300-133 and my [HTC | http://www.htc.com/europe/product.aspx?id=15674] with Windows Mobile 5 - with step by step instructions of Toshiba.

    But I don't know how to use the Internet via BT, I tried many ways, one of them was to create a PAN with P300 as server - correctly connected HTC to P300, but it seams I can share internet with P300 as a gateway. And I want to do the opposite - get internet from my mobile to the computer (while she is away from all the cables). I'm not sure this PAN in the right way...

    The question of the other and less important is to be able to share that connection with your laptop via bluetooth - I guess that this must be done through Pan

    Thanks for any help.

    Bartek

    You found a solution to this?

  • No links to the local area network connection. But how to use the Internet again, please help establish a LAN connection.

    Original title: no local network connection

    No links to the local area network connection. But how to use the Internet again, please help establish a LAN connection.

    Hi H.mustafaakyurek,

    ·         What operating system is installed on your computer?

    You can view the following items on the creation of a network connection:

    Setting up a network home

    http://Windows.Microsoft.com/en-us/Windows7/setting-up-a-home-network

     

    Start here to set up a home network in Windows 7

    http://Windows.Microsoft.com/en-us/Windows7/start-here-to-set-up-a-home-network-in-Windows-7

     

    Setting up a wireless network

    http://Windows.Microsoft.com/en-us/Windows7/setting-up-a-wireless-network

    Also see the following articles on the connection of an Internet connection:

    What do I need to connect to the Internet?

    http://Windows.Microsoft.com/en-us/Windows7/what-do-I-need-to-connect-to-the-Internet

     

    Allows to connect to the Internet mobile broadband

    http://Windows.Microsoft.com/en-us/Windows7/use-mobile-broadband-to-connect-to-the-Internet

    Hope this information helps.

  • How to use the parameter B-BIS in a factory of connections

    How to use the parameter B-BIS in a factory of connections (OS 5.0)?

    I have found no no API for it.

    Maybe http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/io/transport/options/BisBOptio... ?

  • I have a purchased copy of PhotoShop Elements 9.  When I run it now I get an error message - error: 213:19.  What does that mean?  How to use the software I paid?  Thanks a lot for your help!

    I have a purchased copy of PhotoShop Elements 9.  When I run it now I get an error message - error: 213:19.  What does that mean?  How to use the software I paid?  Thanks a lot for your help!

    See here:

    In Photoshop Elements license error

  • I can't find a newer version of adobe flash player for ubuntu 14.04, I tried to use the apt version but it wouldn't work and I don't know how to use the tar.gz files and install, I think the current version to .deb

    I can't find a newer version of adobe flash player for ubuntu 14.04, I tried to use the apt version but it wouldn't work and I don't know how to use the tar.gz files and install, I think the current version to .deb

    Hi LF12,.

    The latest version of Flash Player for Linux is 11.2.202.400.  The current versions of Flash Player are displayed here http://www.adobe.com/software/flash/about/. The versions on the page are updated with each new version.

    --

    Maria

  • Need help on how to use the conference room in adobe connect

    I need help on how to use the conference room in adobe connect?

    I would recommend you start here: Getting Started with Adobe Connect - Adobe Connect user community

  • Pavilion dm4-3090se: how to use the SSD after restoration of the system of Windows backup disks?

    Hello

    After a lot of work, I finally could restore my OS using Windows backup disks that I created a few years back. (The OS has been corrupted when the power has been accidentally deleted from the system and the battery was dead)

    Restoring backup widows put everything on 444 GB C drive.  Nothing I put on the SSD drive d:-20 GB and there is nothing in the tools of HP E: drive - 4 GB

    How can I make use of the SSD drive to help speed up the system?  I see the system starts and runs more slowly now.  I'm ready to blow the current operating system and re-run the Windows backup utility.  But I need to know how to use the SSD during the restoration.

    Any help is appreciated.

    Thank you

    Bob

    Hey @llebrez,

    Welcome to the Forums of HP Support! This is a great place to find solutions and help our community!

    I understand that you have some information about using the SSD in your HP Pavilion dm4 Beats Edition Entertainment Notebook. I'd be happy to help you with that.

    The SSD in your laptop is used for a technology called Intel Smart Response. Intel Smart Response uses the SSD as a type of Cache smart to help load the items faster. The reason why that is not used currently is because the restoration of the system is not designed to use the SSD for intelligent caching and is not able to establish that on its own.

    If you want to configure Intelligent caching on your laptop, you can follow this guide provided by overclock.net: how: implement the Intel Smart Response Technology (SSD caching)

    I hope this helps. If you have more questions that I'm able to answer for you, please do not hesitate to ask.

    Please hold me.

    By pressing the Thumbs Up button below, you can always say thank you!

    See you soon.

  • How to use the Smart zero 4.4.0 customer service and HP Profile Editor to activate chip cards

    I have a T610 HP Smart Thin Client from scratch and I get zero Smart software to recognize the card chip when connecting. How to use the Smart zero 4.4.0 customer service and HP Profile Editor to activate chip cards. You can configure without the profile HP of the XML editor.

    Mike Sieradzki

    Hello ski_mike.

    Welcome to the HP Forums. I understand that you want to support with your Smart Client zero. However, it is a commercial product. To get assistance, thank you for posting your question on the business Forums HP: HP Enterprise Business Community

    Thank you

    Mario

  • How to use the goto function?

    How to use the goto function in indesign javascript?

    my script begins by chekcing if the input files are present or not... If one of the input files is not present, I want the n function put an end to the operation in the display of the message tht file exists... I was wondering to use goto for tht... then how to use it? or is there an alternative to that?

    GoTo is generally frowned upon by the programmers.

    The only legitimate use of goto is when you need to escape from a nested loop.

    If you need to jump into a routine, use break or simply in return from the current function.

    The model currently used by the SDK looks like this:

    do
    {
         if(condition1 == false)
              break;
         if(condition2 == false)
              break;
         if(condition3 == false)
              break;
         doSomethingReallyCool();
    }while(false);
    

    'break' the jumps at the end of the do / while loop that always comes out when you reach the end of it (while (false))

    Substances

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to use the adapter from the wall with my Mac Pro laptop?

    How to use the adapter from the wall with my Mac Pro laptop?

    The AC wall connector is not compatible with the outlet on the MBP?  As the MBP charger will work from 100v to 240v, a transformer is necessary.  You need a converter that connects to the power outlet home and is compatible with your MBP.  You can buy the Apple travel kit:

    http://www.Apple.com/shop/product/MD837AM/A/Apple-world-travel-adapter-Kit

    Or you can use a single specific converter for the geographical area:

    http://www.Amazon.com/orei-grounded-universal-adapter-Singapore/DP/B004SCSV2U/re f = sr_1_4? ie = UTF8 & qid = 1460735377 & sr = 8-4 & keywords = us + in + uk + power + adapter

    (it is a UK USA example)

    Or you can get the converter that adapts the charger directly:

    http://www.Amazon.com/HIOTECH%C2%AE-extension-charger-connecting-specification/d p/B00MA48JZW/ref = sr_1_3? ie = UTF8 & qid = 1460735486 & sr = 8-3 & keywords = us + in + uk + power + ad aptor + apple + charger + cord

    (again, this is for a UK plug.)

    Ciao.

  • How to use the software keyboard Toshiba 50L9450VE TV?

    I just bought a LED TV model 50L9450VE. When installing, I need to enter the password for the wifi network. The remote doesn't have a keyboard of the letter, and the TV shows a soft keyboard to enter the password. How to use the software keyboard? I can't figure out how to get the cursor in it; the manual does not say, and I can't find the information online. Thank you.

    Hershel

    Suppose you are from Israel? Although this model is not made for the EU market, but probably for the Asian market, it looks like the European L93 series.
    You will find how to operate the software keyboard (page 52): http://www.toshiba-om.net/pdf/manual...h-Specific.pdf

  • How to use the recovery CD?

    Hello

    Ive lost the instructions to tell me how to use the recovery CD. I forgot, I need to press to access the disks when I reboot!

    Can anyone help please?
    St. Clare

    Hi clear, before using the recovery CD make you that all important data has been saved to the floppy or USB key because the procedure will erase the entire hard drive. The method for booting from a cΘdΘrom may vary according to the model number of your laptop, but it's something like hold the 'B' button for the Toshiba Startup logo. If this fails you can try to change the boot sequence or use the Toshiba from Windows or the BIOS configuration tool (ESC then F1 when prompted from a cold start) make CD-ROM the first device startup in the list.

    Richard S.

Maybe you are looking for

  • DV6 motherboard replacement

    Hey there, I have a HP Pavilion dv6 - 3172ee Entertainment Notebook, I recently got vga chip proplem with a black screen and I have tried everything and does not light up, so it's time to change the motherboard, I want to know is. can I update my mot

  • Acer aspire V5 571 P - stop with power cable removed

    Acer aspire V5 571 P - when cell phone fully charged and power cable removed from the laptop shuts... Help?  Thank you.

  • BlackBerry Smartphones Facebook

    Hi, I have a 8520 and I loaded the Facebook app on a few weeks ago. I don't know if anyone else has had problems. Half time do not show messages. When sending messages from systems sometimes fails. You cannot change the status of friends if you no lo

  • Format an external hard drive (1 TB) FAT32 in NTFS file system

    HelloI recently bought nine Transcend (TS1TSJ25M3) 1 TB External Hard Drive who is in the FAT32 file system. There are currently 930 GB of free space available. I decided to convert  it to NTFS File system. So first of all, there is no data in thePla

  • Cannot remove Internet Explorer

    I have IE 11 on my laptop and I never use it. I want to unintstall it, but when I go to control panel and click programs and features, that it is not in the list. I click on IE in the app part on my deskstop and make a right click Uninstall and it di