How i connect to my localhost machine to other database machine for sending

hi,
in our organization lan is there. how should i pass the jdbc connection
commands through java program to get the data from database from my system to other database system. here in my system there is no database. please provide the code for that.
import java.sql.*;
public class JDBCTest {
     private static final String DRIVER_NAME="com.ibm.db2.jcc.DB2Driver";
     private static final String DB_URL="jdbc:db2://Krishna:50000/KCC";
     private static final String USERNAME="db2admin";
     private static final String PASSWORD="admin123";
     private static final String QUERY="select * from KCC.KCC_REGISTRATION";
     public static void main(String[] args) throws Exception {
          Class.forName(DRIVER_NAME);
Connection conn = DriverManager.getConnection(DB_URL, USERNAME, PASSWORD);
Statement stmt = conn.createStatement();
ResultSet rslt = stmt.executeQuery(QUERY);
          while(rslt.next()){
               System.out.println(rslt.getString(4));
               System.out.println(rslt.getString(5));
rslt.close();
stmt.close();
conn.close();
System.out.println("Success! Connected to database.");
} this is i have written code. here krishna is my system. we r using db2 data base . it is there in other machine. how should i pass the database connections from local system to database system ( i am accessing the data by dy directly using db URL (jdbc:db2://kcc-db:50000/KCC)). but i don't want to like that. first i want to connect to my localhost then i want to connect to db machine.
please provide the code.

I can't help here, but perhaps this FAQ will - http://pondini.org/TM/AEQ2.html.
Clinton

Similar Messages

  • How to connect my iphone 4s to a USB sound card for 5.1 speakers?

    How to connect my iphone 4s to a USB sound card for 5.1 speakers?

    You can't:
    1. iPhone sound output is stereo, not Dolby 5.1 compatible.
    2. iPhones do not connect sound output by standard USB.  The connecting device has to be iPhone compatible.

  • How to connect a PDF form to SQL server database through web service?

    Hi,
    I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
    I really appreciate your help and advice.

    Hi,
    I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
    I really appreciate your help and advice.

  • How to connect oracle form6i or 10g to mysql database

    can anyone tell me how to connect oracle forms to mysql database using ODBC connector?
    akin

    Hi
    this is step by step installation guide
    http://download.oracle.com/docs/cd/E11882_01/install.112/e10875/toc.htm
    also below link for download
    http://www.oracle.com/technology/software/products/database/index.html
    hope this helps
    Zekeriya

  • How to connect APEX with MYSQL via Apex's Database link

    How do i connect APEX with MYSQL via Apex's Database link? The OBE doesn't go into specific detail about how to link the two.
    can someone please elaborate on what these are and where i can find them in mysql:
    Database Link Name      
    Connect To Schema      
    Password      
    Remote Hostname or IP      
    Remote Host Port      
    SID or Service Name      
    I need to link to mysql database so I can set up a 3D pie chart in apex

    Hi jononioo
    A database link is a device for connecting between Oracle database instances only. Oracle does have a method for connecting to other database systems (Transparent Gateway) but this is restricted to other commercial databases and I don't believe there is a gateway for Mysql. (I could be wrong)
    I don't know Mysql but maybe there is some way to push data to the Oracle instance. Other than that, is there any reason why the data has to reside in the Mysql database?
    Regards
    Andre

  • How to connect to and communicate with an SQLite database in AIR/Flex

    Hey guys,
    I recently decided I would try programming a vocabulary-training program in AIR, so I could use it on Linux as well. I got stuck pretty soon. I am trying to connect to a local SQLite database and I obviously fail epically. Posting the source code of the application here:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
       <mx:Script>
          <![CDATA[  
               import flash.filesystem.File;
              import flash.data.*;
             import mx.controls.Alert; 
                      private var dbFile:File;
                   private var conn:SQLConnection;
                   // -- AUTO INIT FUNCTIONS --------------------------------------------------- /
                   private function init():void {
                        // Create a File Reference to the Included DB
                        dbFile = File.applicationDirectory.resolvePath( "../slovniky.db" );
                        // Create SQL Connection
                        conn = new SQLConnection();
                        // Event Listener that will tell us when the DB is opened
                        conn.addEventListener(SQLEvent.OPEN, openSuccess);
                        // Event Listener that will tell us if an error occurs
                        conn.addEventListener(SQLErrorEvent.ERROR, openFailure);
                   // -- EVENT HANDLERS -------------------------------------------------------- /
             private function starter() :void {
                  slovickoEn.enabled = true;
                  nazor.enabled = true;
                  odeslat.enabled = true;
                  zrusit.enabled = true;
                  start.enabled = false;
                  // Otevírám spojení s databází v asynchroním módu
                   conn.openAsync( dbFile );
             private function openSuccess( event:SQLEvent ):void {
                        // Pokud se spojení povede!
                        Alert.show("Spojení se zdařilo!");
               private function openFailure( event:SQLEvent ):void {
                        // Pokud spojení selže!
                        Alert.show("Spojení se nezdařilo!")
             private function kontrola() : void {
                  if (nazor.text != "") {
                       if (nazor.text == "Pes") {
                       Alert.show("Správně!");    
                       else {
                       Alert.show("Špatně!! " + "Napsané slovíčko bylo " + nazor.text);     
          ]]>   
       </mx:Script>
       <mx:VBox width="400" height="200"
                   horizontalCenter="0" verticalCenter="0" backgroundColor="#FFFFFF"
                   paddingBottom="20" paddingLeft="20" paddingRight="20" paddingTop="20"
       >
          <mx:HBox width="100%" verticalAlign="middle" horizontalAlign="center">
             <mx:Label text="Anglicky:"/>
             <mx:TextInput id="slovickoEn" editable="false" text="Dog" enabled="false"/>
          </mx:HBox>
          <mx:HBox width="100%" verticalAlign="middle" horizontalAlign="center">
             <mx:Label text="Česky:"/>
             <mx:TextInput id="nazor"  enter="kontrola()" enabled="false"/>
          </mx:HBox>
          <mx:HBox width="100%" horizontalAlign="center">
             <mx:Spacer width="50" height="10"/>
             <mx:Button id="odeslat" label="Odeslat" color="#0D8401" click="kontrola()" enabled="false"/>
             <mx:Button id="zrusit" label="Zrušit" color="#0D8401" enabled="false"/>
          </mx:HBox>
          <mx:HBox width="100%" horizontalAlign="center">
             <mx:Spacer width="50" height="10"/>
             <mx:Button id="start" label="Start" color="#0D8401" click="starter()" enabled="true"/>
          </mx:HBox>
       </mx:VBox>
    </mx:WindowedApplication>
    The Run of the program tells me this:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
         at pes/starter()[C:\air\projects\pes\src\pes.mxml:45]
         at pes/__start_click()[C:\air\projects\pes\src\pes.mxml:93]
    I would appreciate any help or a how-to. I am an absolute beginner with some experience from HTML, CSS, PHP and rarely JS. What am I doing wrong? File attached for easier manipulation as well.
    Erthy

    Hi,
    Here is the complete example for the same with the code.Let me know if you have any issue with this.
    http://shardulbartwal.wordpress.com/2008/04/14/adobe-air-and-sqlite-connectivity/
    with Regards,
    Shardul Singh Bartwal

  • How to Connect Forms or any version with Oracle Databases 8/6i/9i/10i/11i

    I want to know that how can i cannect Developer Forms / Reports with Oracle Databases with various versions and say developer 2000 to Oracel 6i/9i/10i/11i etc

    Using the appropriate setting in tnsnames.ora file located in your [Forms_Home]\network\admin directory.
    Sim

  • Time Machine - Browse other Time Machine disk - not showing all files

    I have an Xserve, running 10.6 server, where we keep all of our files. It backs up via Time Machine. Many users use the shared drives on the Xserve, and I encourage them to put their files there. We work in a design / production house, so many people collaborate on files. Due to the nature of the business, with frequent design changes, we need to go "back in time" and pull out previous versions of designs, etc. Usually I handle this by remotely accessing the Xserve, starting up time machine, and pulling out the old versions of files from the backups.
    However, when I'm not in, I wanted to make this option available to another user, without giving her full access to the server. I discovered the "Browse Other Time Machine" option, and after making my Time Machine disk (actually a rack-mount Mercury Pro RAID array) shared, I was able to mount it on her Mac, also running 10.6. I thought this would be a nice solution.
    The problem is, in some directories, when browsing from her computer, Time machine is showing no backups. It's impossible to go back more than a few snapshots with it. Meanwhile, if I do it on the server, everything is fine. So I thought perhaps it was a permissions issue, but I don't want to muck up the permissions on my time machine drive and risk losing everything. I did add her account as a user with read-only access to the time machine drive, and told it to apply to all sub folders. This didn't make any difference.
    What is the issue? Is it permissions? Or is my Time Machine too large (6TB) that it can't load all the data over the network? Has anyone encountered this before? What is the best way to troubleshoot?

    If you still have the old imac connect tbe two with an ethernet cable and use migration assistant. Move your data to a new Mac - Apple Support

  • How to diable only one field enabled and other fields disabled for one user group?

    Hi,
    I have a form contains many fields. A group of users can add items using that form.
    As per the user requirement I have created a filtered view and that filtered view can be seen by some other sharepoint user group but as per their further requirement the new sharepoint user group is only allowed to update Remarks field. All other fields
    should be disabled for them.
    In my idea, I have to create multiple forms and in one of it except Remarks field all should be disabled but I am unable to assign multiple forms to a single list.
    Or how to make Remarks field enable to this user group and for other admin user group all fields could be enabled.
    Hope I have expressed my question correctly.
    Any solution would be appreciated.

    There is no Out of the Box way to set permissions on each column, primarily due to the performance impact. The following thread provides some options,
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c0794232-9bab-4cea-91d8-f311a793a863/how-to-set-column-wise-permission-in-sharepint-list-in-sharepoint-2010?forum=sharepointadminprevious
    Dimitri Ayrapetov (MCSE: SharePoint)

  • How to connect USB external Harddisk to Hyper-v virtual machine

    Hi,
    We are running hyper-v server 2008 R2, we have external USB harddisk connected in hyper-v Manager, we are not able connect this USB to virtual machine.. is this option is available in hyper-v? if no is there any document from microsoft stating the same?
    Regards
    Asha

    Hi,
    Unfortunately, USB is not supported on a Hyper-V virtual machine. You can perform the following suggestions:
    1. Offline the USB hard disk on the Hyper-V host machine and connect it to the virtual machine as a pass-through disk(if the USB hard disk is support)
    For more information, you can refer to:
    Configuring Pass-through Disks in Hyper-V
    http://blogs.technet.com/b/askcore/archive/2008/10/24/configuring-pass-through-disks-in-hyper-v.aspx
    2. You can also use some USB over Ethernet application.
    Best Regards,
    Vincent Hu

  • How do connect my sony bravia tv as a monitor screen for mac pro

    How do I connect my Sony Bravia tv as a monitor for my MacBook Pro? I have an hdmi lead with an adapter to the computer and get a picture of factory setting cosmos with some of the folders of my desktop going off the side of the tv screen.

    If you have the right cable, and have set the right input on your Sony, then you need to adjust one thing.  Go to System Preferences>Displays>Set Mirroring.  I think you've got it set to Extended desktop, which means the Sony is just a HUGE extension of your Mac OSX desktop.
    That should fix your issue.

  • How to connect IDM 5 to a new waveset database

    We have IDM 5 installed and use MS SQL server 2000 as repository. The old database is corrupted. We are going to move the old database to a new server. Does anyone have any idea how to make IDM connect to the new database?
    Thanks!

    You can also use lh setrepo to configure new repository configuration XML file.
    There is an option -o by which you can define the output XML file but still make sure you take the backup of the existing serverrepository.xml file.

  • How to connect my apple devices to each other

    My apple gadgets has problem connecting each other, i am upset in my iphone 5 and ipod nano 7th gen connecting to each other in macbook pro..
    can you give me an advice to solve this problem...

    Exactly what do you want to gain by connecting them to each other?
    Apple has never used Bluetooth except to connect to peripherals. So if you want to move data via Bluetooth between them it is not going to happen.
    Allan

  • How to connect multiple Xserve Raid for Best Performance

    I like to get an idea how to connect multiple Xserve Raid to get the best performance for FCP to do multiple stream HD.

    Again, for storage (and retrieval), FireWire 400 should be fast enough. If you are encoding video directly to the external drive, then FireWire 800 would probably be beneficial. But as long as the processing of the video is taking place on the fast internal SATA drive, and then you are storing files on the external drive, FireWire 400 should be fine.
    Instead of speculating about whether it will work well or not, you need to set it up and try your typical work flow. That is the only way you will know for sure if performance is acceptable or not.
    For Time Machine, you should use a single 1.5TB drive. It is likely that by the time your backup needs comes close to exceeding that space, you will be able to buy a 3TB (or larger) single drive for the same cost. Also, I would not trust a RAID where the interaction between the two drives is through two USB cables and a hub. If your primary storage drive fails, you need your backup to be something that is simple and reliable.
    Oh, and there should be no problem with the adapter, if you already have it and it works.
    Edit: If those two external drives came formatted for Windows, make sure you have use Disk Utility Partition tab to repartition and reformat the drive. When you select the drive in the Disk Utility sidebar, at the bottom of the screen +Partition Map Scheme+ should say *GUID Partition Table*. When you select the volume under the drive in the sidebar, Format should say *Mac OS Extended (Journaled)*.

  • How to connect Sql Server 2000 using JDBC ODBC Driver

    How to connect Sql Server 2000 using JDBC ODBC Driver ?
    plz Send Syntax.
    thanks

    In SQL Server 2000 the driver class is com.microsoft.jdbc.sqlserver.SQLServerDriver
    The connection URL for the default SQL Server 2000 database is jdbc:sqlserver://localhost:1433
    Class.forName(
      "com.microsoft.sqlserver.jdbc.
      SQLServerDriver");
    String url =
      "jdbc:sqlserver://localhost:1433";
    Connection conn = DriverManager.
      getConnection(
      url, "sa", "sqlserver");

Maybe you are looking for

  • Audio USB crackles on MBP with Retina and Mountain Lion

    I have a USB device connected to my MacBook Pro with Retina Display and the audio crackles no matter what I play.  I hardly have any processing working and there are no other USB devices.  I think that this was working under Lion but I think this is

  • Apple TV 3 Buffering Issues using Ethernet

    I have an ATV3 that is connected via Ethernet with Comcast Xfinity.  I have 30+ dl speeds but am constantly having problems with buffering  It seems to be only movies bought through Apple.  HBO, Showtime, ESPN, Netflx, etc. all seem to work with mini

  • "Can't use this version of iChat...

    ...with this version of OS X" is the message I get when trying to launch iChat from my MacBook. Works fine on my iMac. Recently downloaded Leopard to both computers. Any suggestions?

  • Photos from iPhone direct to Drive?

    I take hundreds of photos and videos while on vacation. Is there any way to get photos and video off of my phone (to make room for more) while on the road without my Macbook or using the internet/data transfer?

  • New Set of Book

    Dear all, I have Requriment of Open New Set of Book, in This Way i Need To Change in AP, AR,GL what should i Follow and What Changes Requried in these module i Setup Level. Thanks