How to connect Java Application with database!

Dear all, now I am create a dababase application. My database use JData Store. But I don't know how to connect application with it. Can you tell me this proplem?
Thank!

Do a google search for JDBC, or go buy a book.
You will need a JDBC driver which supports your database. Or you might be able to use the JDBC-ODBC bridge if there's an ODBC driver for your database.

Similar Messages

  • How to connect Java to oracle Database Express Edition?

    Anyone can help me?
    How to connect JAVA TO ORACLE DATABASE EXPRESS EDITION?

    I suggest you to read this article:
    http://wiki.oracle.com/page/JDBC
    Regards,
    Ricky

  • How to connect webdynpro application to database (Sql server)

    Hi Experts,
    Can someone suggest me how to connect webdynpro application to SQL Server. (Possibly in detail)
    Thanks Regards,
    Sandeep

    hi sandeep,
    here is a sample code which connects to a backend database Oracle; Connection is same for all DBs as you are using open sql commands.
    <b>   try {
         String eposta = wdContext.currentContextElement().getEposta();
         String tel = wdContext.currentContextElement().getTelefon();
         String company = wdContext.currentContextElement().getCompany();
         String message = " ";
         String onerikonusu = " ";
         String oneri_mdurum = " ";
         String oneri_odurum = " ";
         String oneri_bfaydalar = " ";
         String oncelik1 = " ";
         String uygulama = " ";
         String tarih = (new SimpleDateFormat("dd-MM-yyyy").format(new java.util.Date()));
         String saat = (new SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
         //java.sql.Date tarih = java.sql.Date.valueOf(creationDate);
         //java.sql.Time saat = java.sql.Time.valueOf(creationTime);
         if (wdContext.currentContextElement().getMesaj() != "")
            { message = wdContext.currentContextElement().getMesaj(); }
         if (wdContext.currentContextElement().getOneri_konusu() != "")
              { onerikonusu = wdContext.currentContextElement().getOneri_konusu(); }
         if (wdContext.currentContextElement().getOneri_mdurum() != "")
              { oneri_mdurum = wdContext.currentContextElement().getOneri_mdurum(); }
         if (wdContext.currentContextElement().getOneri_konusu() != "")
              { oneri_odurum = wdContext.currentContextElement().getOneri_odurum(); }
         if (wdContext.currentContextElement().getBekfaydalar() != "")
              { oneri_bfaydalar = wdContext.currentContextElement().getBekfaydalar(); }
         if (wdContext.currentContextElement().getOncelik() != "NULL")
              { oncelik1 = onceliktxt.toUpperCase(); }     
         if (wdContext.currentContextElement().getUygulama() != "NULL")
              { uygulama = app.toUpperCase(); }
       InitialContext ctx = new InitialContext();
       javax.sql.DataSource ds =
       (javax.sql.DataSource) ctx.lookup("jdbc/SAPEPPDB");
       java.sql.Connection con = ds.getConnection();
       con.setAutoCommit(false);
       java.sql.Statement stmt = con.createStatement();
         String sql;
          int rows;
          sql = "insert into tmp_feedbacks " +
               "(puid, name, tel, email, company, konu, oncelik, uygulama, mesaj, onerikonusu," +
               "oneri_mdurum, oneri_odurum, oneri_bfaydalar,tarih,saat) " +
               "values ('" + username + "', " +
                         "'" + name + "'," +
                         "'" + tel + "'," +
                         "'" + eposta + "'," +
                         "'" + company + "'," +
                         "'" + konutxt.toUpperCase() + "'," +
                         "'" + oncelik1 + "'," +
                         "'" + uygulama + "'," +
                        "'" + message + "'," +
                        "'" + onerikonusu + "', " +
                        "'" + oneri_mdurum + "', " +
                        "'" + oneri_odurum + "', " +
                        "'" + oneri_bfaydalar + "', " +
                        "'" + tarih + "', " +
                        "'" + saat + "' " +
         stmt = con.createStatement();
         rows = stmt.executeUpdate(sql);
         con.commit();
         stmt.close();
       catch(Exception e){
            IWDMessageManager msgMgr =
                    wdComponentAPI.getMessageManager();
       msgMgr.reportException(e.getMessage(),true);
       }</b>
    The value <b>ctx.lookup("<jdbc_pool>");</b> depends on your system id.
    if your system id is SID the the string has to be <b>jdbc/SAPSIDDB</b>
    you can check it via visual admin >> server >> services >> jdbc con.

  • How to connect Java Application to ORACLE8i over SSL connection

    Hi,
    I would like to know how to make an existent Java application connect to an ORACLE8i database over a secure SSL connection?
    can I user ResultSets?
    Could you please tell me what parameters to set on the database and, especially, what new code must be added for the Java Application so send data over an SSL connection.
    Your advice/hints will be greatly appreciated.
    Vani

    Use usual Oracle' encryption. SSL configuration is a nightmare.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Properties props = new Properties();
    try {
    props.put("user", "scott");
    props.put("password","tiger");
    props.put("oracle.net.encryption_client", "REQUIRED");
    props.put("oracle.net.encryption_server", "REQUIRED");
    props.put("oracle.net.encryption_types_client", "( RC4_56 )");
    props.put("oracle.net.encryption_types_server", "( RC4_56 )");
    props.put("oracle.net.crypto_checksum_client", "REQUIRED");
    props.put("oracle.net.crypto_checksum_server", "REQUIRED");
    props.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
    props.put("oracle.net.crypto_checksum_types_server", "( MD5 )");
    props.put("sqlnet.crypto_seed", "769764576979045769576907");
    } catch (Exception e) { e.printStackTrace(); }
    Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl)(PORT =1521)))(SDU=32767)(CONNECT_DATA=(SERVICE_NAME=orcl)(SID=orcl))", props);
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
    while (rset.next ())
    System.out.println (rset.getString (1));
    rset.close();
    stmt.close();
    conn.close();

  • Connect Java Application with a Session Bean

    Hi,
    my Problem is following:
    I have session bean (stateless) and i try to write i client for it!
    I get always the same error message, when i call the java ClientApplication from the Command line:
    java -jar Betting_server.jar BettingServer
    StartBetting Server
    Part1
    Caught an unexpected exception!
    javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory. Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:217)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at at.siemens.mma.iap.betting.server.CreateQRunTimer$RemindTask.run(CreateQRunTimer.java:47)
    at java.util.TimerThread.mainLoop(Timer.java:432)
    at java.util.TimerThread.run(Timer.java:382)
    My configuration:
    jboss-3.2.1_tomcat-4.1.24
    j2sdkee1.3.1
    j2sdk1.4.1_02
    My Client Class:
    package betting.server;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import java.util.*;
    import betting.ejb.*;
    public class CreateQRunTimer {
         Timer timer;
         public CreateQRunTimer() {
              timer = new Timer();
              timer.schedule(new RemindTask(),
                        0, //initial delay
                        1*60*1000); //subsequent rate 30 minutes
         class RemindTask extends TimerTask {
              public void run() {
                   String logicalBettingBeanName = "MyBetting";
                   Betting bet;
                   BettingHome bethome;
                   try
                        System.out.println("Part1");
                        Properties props = new Properties();
                             props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
                             props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
                             props.put("java.naming.provider.url", "localhost:1099");
                        InitialContext ic = new InitialContext(props);
                        System.out.println("Part2");
                        Object objref = ic.lookup(logicalBettingBeanName);
                        System.out.println("Part3");
                        bethome =(BettingHome)PortableRemoteObject.narrow(objref,BettingHome.class);
                        bet = bethome.create();
                        long qRunMagicNum = bet.DB_CreateQRun();
                        if(bet.CreateConfigurationFileQuery(qRunMagicNum) == false)
                             // failed
                             System.out.print("CreateConfigFileQuery failed");
                        else
                             bet.TransferXMLFiles("tvbetqrun.conf",0);
                             System.out.print("CreateConfigFileQuery succed");
                   catch (Exception ex)
                        System.err.println("Caught an unexpected exception!");
                        ex.printStackTrace();
                   System.out.println("Run GG");
                   //System.exit(0); //Stops the AWT thread (and everything else)

    Normally, if you are executing the client from the command line, you do not specify the classpath in a XML file (unless you are using ant or something similar). You can specify the classpath by using the -classpath option.
    Try something like
    java -classpath <path_to_jboss>/client/jbossall-client.jar;Betting_server.jar BettingServer
    You can check the classpath in your client with the statement
    System.out.print(System.getProperty("java.class.path"));

  • Connecting Java Application with Microsoft Word Toolbar

    My project involves designing a GUI with which I will use Java for. And I also have to create a Microsoft Word Toolbar that will open the Java GUI. There will be other interactions between both the GUI and the toolbar.
    Is that possible? Or shall I use Visual Basic or .NET for the GUI?
    Advice appreciated please!

    hi
    check this
    http://help.sap.com/javadocs/NW04/current/bi/docs/connectors/sapq_howto.html
    let me know am i reached ur  point
    bvr

  • New JAVA application with data from SAP CRM and R/3

    Hi All,
    We have a requirement to create a new application which will have CRM BP Master data and D&B Data from R/3 and based on authorization different roles be able to edit some of the fields and workflows to confirm the new data .Once users edit the fields in the application the new data will be replicated back into BP Master Data in CRM.
    In our company we are using CRM 7.0 and R/3 4.7 system if we decided to create the application using JAVA can you please let me know the architecture(servers etc) we might need because of the JAVA application.
    How to connect Java application to SAP CRM 7.0. Can you please guide me the data flow structure
    I am not sure if this is the right forum if not please suggest appropriate forum.
    Thanks a lot ,
    Kitcha.

    Hi,
    You can connect to SAP Systems by consuming the RFCs.
    you can use the JCO API to connect to R/3. the [documentation |http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm]
    alternatively  you can use SAP Enterprise Connector to generate JCO Proxies : [The Documentation|http://help.sap.com/saphelp_nw04/helpdata/EN/ed/897483ea5011d6b2e800508b6b8a93/frameset.htm]
    and somr more helps:
    http://help.sap.com/saphelp_nw04/helpdata/en/89/8a185c148e4f6582560a8d809210b4/frameset.htm
    Regards,
    Naga

  • How to start java applet with netbeans 6.1

    hey,
    I want to learn how to start java applet (with database) with netbeans.. I'm new to java...can you show me how can i start..if you have any doc about it can you send it to me..thank you..:)

    You really should be asking this NetBeans question at the NB site - these forums are for Java language topics, not NB support.
    [http://www.netbeans.org/kb/61/web/applets.html]
    Almost any NB question you have can be answered by either the NB web documentation or the NB program's Help.

  • How to connect java with oracle

    can any body show me the code of how to connect java with oracle database.
    thank you

    To configure Oracle JDBC:
    1. Add Oracle JDBC JAR file classes12.zip or ojdbc14.zip to classpath.
    2. Load and register the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    3. Obtain a connection:
    String url="jdbc:oracle:thin:@<host>:1521:<database>
    Connection con = DriverManager.getConnection(url,
    "myLogin", "myPassword");
    4. Create a SQL statement.
    Statement stmt = con.createStatement();
    5. Obtain a result set.
    ResultSet rs = stmt.executeQuery(
    "SELECT ...");

  • How to connect Developer 6i with third party Databases

    How to connect Developer 6i with third party Databases

    Hi,
    Oracle Forms 6i comes with a Oracle Client Adaptor, OCA, that allows you to connect to 3rd party databases. Starting Forms 9i you use gateways.
    Frank

  • How to connect message server with application server?

    How to connect message server with application server?

    Hello  Damodar,
    The connection is established at the time of installation only !!. At the time of installation you need to specify the Central Instance(message server in most cases unless you have a dedicated message-enque server).
    Regards.
    Ruchit.

  • How to integrate android application with oracle database using oracle mobile database server.

    Hi,
    I developed one web application using oracle database. I want to implement same web application in android. My problem is how to integrate android application with existing oracle database using oracle database mobile server. Can u please guide me how to install oracle database mobile server and how to integrate android app with existing oracle database..
    Thank you.

    In the Database Mobile Doc set there is an entire book that covers the Installation of Oracle Database Mobile Server.   Chap 4 of that book contains screen shots and all kinds of information that will help guide you through the installation.   We also have a doc on the different mobile clients.  Chap 2 of that guide covers installs and integration of an android app. 
    thanks
    mike

  • How to connect Java into BarTender Label Printing Software

    Hi,
    I have one problem, my company have bartender label printing software 32 bit version, previously they use VB6 for controlling the dublicate printing of lable,but the software is gone. Now i want to do this in Java, but i don't know how to connect java into Bartender software.
    my company using old version, it accept only VB6. My Boss said can buy new Bartender Software but i don't know how to link and control dublicate printing. if anybody knows this connection between Bartender and Java please help me.
    if bartender New version support this features please send the link and example source code please help me.
    AnbuAathi

    Hi , i have the similar task ,where i need to connect my web portal application with the bartender software .I did a hugh R&D to integrate Java application with Bartender software but did not find any luck .So i request to provide the needed help to integrate my Java Application with Bartender software .
    Thanks in Advance
    Mohan

  • How to connect java to MS Access

    How to connect java to MS Access using jdbc
    Can U write the complete code for it ? How to interact with the fields ?

    G O O G L E
    http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2691&lngWId=2
    http://blog.taragana.com/index.php/archive/how-to-access-ms-access-database-from-jdbc/

  • How to connect to a remote database in a lan??

    Hey guys......! I need to connect to a remote msaccess database in a lan and import its data into my mysql database.I know how to connect to a msaccess database using ODBC.But I don't know how to connect to a remote database without creating dsn in the machine where database is.One thing more...I want to know, how can I import data into my mysql database?? Is there any query for that or simply I have to select data from msaccess database and insert into tables of my database??Please, send me the source code in the forum itself and explain also.This is the last feature of my project.So I need to do it as soon as possible.

    If the mdb file in LAN, Just map the network drive.[Windows Explorer/Tools/Map Network Drive] in your system from which we need to access the remote mdb. Then go to ODBC Data Source Admin.. and create a new data source[Microsoft Access Driver] . After clicking the Select button, you will find a Network Drive will be visible on your Drives drop down. Select the map Drive, If not visible then just click the Network button there and map the network path where the mdb files reside. And use the JdbdOdbcDriver class to connect from java.

Maybe you are looking for

  • Problems with webtop groups and/or replication

    Hi, i use sgd 4.2 (4.20.909) with to array members. I have the Problem, that the webtop group informations get lost every few hours. And the Users have to set it up again. We have over 1.500 Applications and over 1.500 Servers integrated in our ens.

  • Isight not recognized by Skype, Google Video Chat, Logitech VID and ichat.

    MacBook4,1 Firewire Leopard 10.5.8 Skype 2.8.0.866 Quicktime Plug in 7.6.9 QUictime player MIA Here is my story. I will try and make it as brief as possible. The other day, I put a rented DVD into my dvd drive, and it didn't load. I checked for updat

  • Neeed for Sales Assistance issue in oracle istore

    Hi All, I have an issue on Need for sales rep assistance notification mail in oracle EBS.Mail sending to the address with out any issue.But mail does not having &QUOTEDETAILWITHTAX details.Means Product , # of Units Shippable? , Net Amount are missin

  • How do i get my music back after restoring my ipad accidentaly

    I restored my ipod by mistake and now I have no music on my ipod.  I still have it on my computer so how do I get back on my ipod?

  • AR Invoice

    We currently have 2 different operating units, 1 which is live and the other that will go live in about 6-7 weeks. In OU1 (the one that is live) we have already created an invoice via XML Publisher and it's working well :) We need to do the same for