Remote database access via JDBC?

Hello,
Can anyone give me info on accessing remote databases (i.e. Microsoft
Access, etc) from Java programs (Servlets, JSP's, Classes) residing on the
iSeries (AS400) or perhaps any platform?
I currently have a couple of web applications set up on the Websphere App server that access DB2/400 database and I also have some Java Classes on PC's that access MS Access datafiles. I would like to begin writing the majority of my applications that run on the iSeries (or host system) that can remotely access other databases on our network.
Any info would be of great help to me.
Thank you
Don

I don't know of any existing Access JDBC drivers that support remote access, after all, the Access database itself is not remote access capable except via file sharing. One possibility is to look for a Type 3 JDBC driver that supports reuse of other Type 1 (ODBC bridge), Type 2 (Java/Native Mix) and Type 4 (pure Java)JDBC drivers on the server side.
If you were using WebLogic Server, I suppose you could use its remote JDBC facilities, but that won't help you.
One problem you will have to face is that Access JDBC drivers are not (if I recall) meant to be used in a multithreaded fashion. Good luck. By the way, it might be far simpler to port the Access database to DB2/400.
Chuck

Similar Messages

  • Database access via Jdbc  in JSP

    Hey guys,
    Need a help here..I want to compare a data to existing data in a table sequencially.
    1)re is the example, if i have a user login prog,i want to compare the user already exists in that data table.
    if so how can print the user id's to compare?
    and 2)at if the user id is a wave file(binary data) in SQl? since its immposible to compare the binary data?
    keep me posting,thanks

    1. Well, perform a query.
    2. Who says you can't compare "binary" data?

  • 10G Forms connect to MS Access via JDBC

    A new project requires a 10G Form to connect to MS Access database. I understand 10G no longer connects to Access using ODBC. Will JDBC work? If JDBC can be used does anyone have a "How To" document or examples on how to connect orms 10G to MS Access via JDBC
    Thanks
    Ralph

    I dont think it will work. In 10g forms is going to implement transparent gateways.
    Is there a possibility of getting the data from MS access directly to Oracle database and then connect to Oracle DB from forms ?
    Rajesh Alex

  • Remote TC access via port forwarding

    I have been trying to setup my network for remote TC access via port forwarding. Here's my setup:
    Verizon FiOS router (main router, dhcp & nat) -> connected to TC set in bridge mode with a static IP
    I can remotely access the TC using Back to my Mac with no problems, and of course locally on the home network via Wifi.
    Since the TC has to connect in bridge mode, port forwarding is done on the FiOS router.
    If I set a port forwarding rule in the FiOS router TCP,UDP (any) to port 548, it works. However I want to use a specific connection port
    so others can't connect unless they know the forwarded port. BTW, I have remote disk sharing set with Use Device Password.
    So here's what works:
    FiOS Router (TCP any -> 548, UDP any ->548)
    What doesn't work:
    FiOS router (TCP 8990 -> 548, UDP 8990 -> 548).
    Is there any additional setting required for specific port forwarding to work?

    You're my hero!
    I also have my TC in Bridge Mode to my Verizon FIOS Router.  I used to be able to access my TC remotely, but since I upgraded my router (MI424WR GigE), I had forgotten some port forwarding rules I must have established in my old router.  Once I re-created these two port forwarding rules (just like yours), I can remote access my TC (with TC password) again.
    In addition, I have a static host name aliased to my dynamic IP address through dyndns.org (I have the free version, which I don't think is available anymore, but there are other free providers out there) for easier remote access.
    Regarding, Secure Share Disks: with TC password vs a disk password. Is one more secure than the other?
    Thanks!

  • Prevent remote database access

    we cannot change easily our passwords and we must prevent remote access to SYS and SYSTEM accounts.
    Is there a way to prevent remote database access on SYSTEM account without changing password ?

    Hi,
    Look for this tip in http://www.oracle.com/technology/oramag/code/tips2004/061404.html
    I hope this helps
    Cheers

  • PJC and database access through JDBC

    Hello,
    I'm trying to access to the database through a PJC via JDBC.
    conn = DriverManager.getConnection ("jdbc:oracle:thin:@machine:1521:XE", "user", "pwd");It works fine on a XE database, but fails on another XE one:
    Oracle JInitiator: Version 1.3.1.22
    java.lang.NullPointerException
         at oracle.jdbc.ttc7.O3log.marshal(O3log.java:606)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:255)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:377)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:515)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:345)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at oracle.forms.fd.AsyncJob.connect(AsyncJob.java:68)
         at oracle.forms.fd.AsyncJob.run(AsyncJob.java:121)
         at java.lang.Thread.run(Unknown Source)It also fails on a remote Unix database:
    java.security.AccessControlException: access denied (java.net.SocketPermission monadev resolve)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
    ...so I edit the java.policy file of the Jinitiator directory:
    permission java.net.SocketPermission "machine:port-", "accept,connect,listen,resolve";     and then get the same execption:
    java.lang.NullPointerException
         at oracle.jdbc.ttc7.O3log.marshal(O3log.java:606)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:255)
    ...Finally, it work on only one machine and only a local database.
    I'm probably missing something somewhere.
    Is anyone could give me some light on this ?
    Thanks in advance,
    Francois

    I'm just learning to work with PJC's, so I'm unsure whether I can help, but here goes. I found the following archived on Google Groups (http://groups.google.com):
    Hi. The basic applet security model is that it can only make connections
    back to the machine from which it was downloaded. If you want to do
    JDBC from an applet to a DBMS not on the applet-server machine,
    you need a type-3 JDBC driver. A type-3 JDBC driver has an all-Java
    client driver piece which an applet can download and use. This driver
    piece connects to a proxy piece which is running on the webserver
    machine. This proxy piece then connects to any DBMS anywhere on the
    net, and is the middleman between the JDBC client and DBMS.
       For security, management and performance reasons it's usually better to
    constrain JDBC to a middle tier such as in a servlet, and use HTML to and
    from the client, rather than the space and time involved in downloading a
    full general query engine (a JDBC driver) to a client which typically uses
    .1% of the capability or classes of the JDBC driver.
    Joe Weinstein at BEA HTH,
    Eric Adamson
    Lansing, Michigan

  • Remote Database connection throught JDBC-ODBC

    Hi everybody
    I've developed an application which connects to a MS Access database throught the JDBC-ODBC bridge; if the database is on my local machine I've no problem at all, but I now need to connect to a database on a remote PC. I've set the DSN entry for the database on the remote computer and try to connect using something like:
    String db_name="jdbc:odbc:remote_pc_name\\\\DSN_db_name";
    Properties db_prop=new Properties();
    db_prop.setProperty("user","username");
    db_prop.setProperty("password","user_password");
    Connection dbconn=DriverManager.getConnection(db_name,db_prop);
    but the ODBC driver gives me the message
    "[Microsoft][ODBC Driver Manager] DSN not found and driver not specified.
    I've tried other possible "connection strings" but I always get the same message.
    The software works properly if I connect to the local DB with:
    String db_name="jdbc:odbc:DSN_db_name";
    Any idea how to connect to a remote DB through ODBC?
    Thanks

    No need for a separate thread really is there? its still relevant to the original.
    import java.awt.*;
    import java.sql.*;
    public class JDBC1 extends Frame {
         private static final String DB = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=\\\\http:\\\\www.cs.stir.ac.uk\\~dcl\\databasename.mdb";
         public static void main(String[] arguments) {
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
                   System.out.println("Driver registered!");
                         Connection conn = DriverManager.getConnection(DB, "", "");
                   System.out.println("Connected!");
                   Statement st = conn.createStatement();
                   System.out.println("Statement created!");
                   ResultSet rec = st.executeQuery("SELECT * FROM people");
                   System.out.println("Queried!");
                   while( rec.next() ) {
                        System.out.println( rec.getString(2) );
                   st.close();          //close the statement
                   conn.close();          //close the connection
              catch( SQLException s ) {
                   System.out.println("SQL Error: "+ s.toString() + " " + s.getErrorCode() );
                   s.printStackTrace();
              catch( Exception e ) {
                   System.out.println("Error: "+ e.toString() + e.getMessage() );
    }

  • Abap-table access via JDBC

    Hello,
    we have a java-program, that accesses data via jdbc to a mysql-database.
    Now we want to migrate the mysql-table to abap-table.
    How can we access from the  java-program to theese migrated abap-tables via jdbc?
    Regards Oliver

    Oliver,
    If you want to access those tables from SAP, then you have to use the Java Connectors (
    JCO).
    Please write the more details abount the java IDE and OS, which you are using I will send you appropriate help.
    Thanks

  • Database Access via ODBC

    Hi,
    Since recent (LMS3.2) Cisco released the Open Database Schema support. In the guidelines I find info/procedures to access the database remotely via ODBC. However only Solaris/Solaris Windows/Windows is described. Is there any info how I can access the Database (LMS installed on Sol10) remotely via a Windows system ?
    Jan

    The instructions for Windows/Windows apply, but you'll need to first get the necessary DLLs to allow for database access. The easiest way to do this would be to install Common Services from the LMS 3.2 DVD on a Windows 2003 or 2008 machine. Then extract the DLLs, and uninstall Common Services.
    It may also be possible to start the installer, have it extract the install bits to the TEMP location, then you can pull the DLLS from there. However, I have not tried this for obtaining database DLLs (only device packages).

  • Palm Database access via Midlet application

    Hi.
    I'm trying to access a Palm database from within a Midlet application for the Palm.
    Is there a Java API that I can upload onto my Palm which will give me access to the Palm database ?
    Regards,
    Matt
    P.S. Here's what I've tried already.
    I cannot get hold of the KVMUtil.prc, nor it's associated SDK. It seems like it has been replaced by the MIDP SDK.
    RMS is the only database access provided in the MIDP suite, described in the following article :
    http://developer.java.sun.com/developer/technicalArticles/wireless/midpdatabase/
    This is too generic for me - as it should be - midlets are supposed to run on more than just Palm devices.

    Hi Matt:
    I'll address your 5 major areas 1 at a time. This is only my opinion, only you can decide what will work best for you.
    Sun may have stated the Kjava API is not officially supported. However, Sun has enhanced the Kjava API since its initial release.
    1. I'm trying to access a Palm database from within a Midlet application for the Palm.
    What I'm doing is treating the com.sum.kjava classes as an add on package, using the JAR tool to include these classes prior to building the .PRC.
    2. Is there a Java API that I can upload onto my Palm which will give me access to the Palm database ?
    Yes, it is part of the j2me_cldc installation, see below. It will allow you access to any PDB on the Palm. Like Palm address, memo etc.
    3. I cannot get hold of the KVMUtil.prc, nor it's associated SDK. It seems like it has been replaced by the MIDP SDK.
    When a developer downloads and unZips the most recent versions of the two j2me files:
    j2me_cldc-1_0_2-fcs-winunix.zip
    j2me_cldc-1_0_2-fcs-kjava_overlay.zip
    the following directory structure is created
    c:\j2me_cldc\bin\common\api\classes;
    -- j2me_cldc
    -- bin
    -- common
    -- api
    -- classes
    -- com
    -- java
    -- util
    -- javax
    -- microedition
    -- io
    etc.
    As of 05/01/2001 the KVM.prc and KVMUtil.prc existed here: c:\j2me_cldc\bin\kjava\palm\
    When a developer downloads and unZips the most recent version the file:
    j2me_cldc-1_0-fcs-bin-b10-win-15_sep_2000.zip
    the following directory structure is created
    c:\midp-fcs
    -- classes
    -- java
    -- util
    -- javax
    -- microedition
    -- io
    -- lcdui
    etc.
    When a developer downloads and installs the most recent version the file:
    j2me_wireless_toolkit-1_0_2-ea-win.exe
    the following directory structure is created:
    c:\J2MEWTK
    --bin
    midpapi.zip
    etc.
    Three places to get the MIDlet classes each class has a different creation date too. I've installed the classes oldest to newest in my development environment.
    Check you classpath. I've created a setup.bat to configure the classpath.
    4. RMS is the only database access provided in the MIDP suite, described in the following article:
    No. It is one of two options, RMS and Kjava Database. However, it may not be a option for a Palm if the RMS Database cannot be created on a server and then HotSync'ed to a Palm. A Palm app would be pretty useless if we cannot instantiate its databases with data.
    5. This is too generic for me - as it should be - midlets are supposed to run on more than just Palm devices.
    I agree, that is why I have not stopped using the Kjava Database objects. I've written a server-side Palm Database API the will convert data from any source into Palm PDB's. These PDBs are then HotSync'ed to the Palm. A Palm app would be pretty useless if we cannot instantiate its databases with data.
    Matt, let me know if this helps.

  • Command Window Database Access via a DataSource (Pt 2)

    Hi.
    For those of you (especially duffymo) who were good enough to make suggestions concerning my problems when attempting to access an Oracle 10g database via a DataSource from a servlet the week before last, I'm pleased to say that I got that working on my return from holiday!
    Now to return to an earlier problem...
    I'd like to access the same database from a standalone, command window program and have tried setting the INITIAL_CONTEXT_FACTORY and PROVIDER_URL properties as shown below.
    Hashtable envt = new Hashtable();
    envt.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.apache.commons.dbcp.BasicDataSourceFactory");
    envt.put(Context.PROVIDER_URL, "http://localhost:8080");
    Context initialContext = new InitialContext(envt);
    Context context =(Context)initialContext.lookup("java:comp/env");
    DataSource dataSource =(DataSource)context.lookup("jdbc/Oracle_Finances");
    connection = dataSource.getConnection();
    However, this generates error messages with root exception "java.lang.ClassNotFoundException: org.apache.comons.dbcp.BasicDataSourceFactory".
    If I copy the JAR file containing BasicDataSourceFactory (viz. commons-dbcp-1.2.1.jar) from Tomcat's common\lib folder into Java's jre\lib\ext folder, then I get a similar set of error messages, but the root exception changes from ClassNotFoundException to "java.lang.ClassCastException: org.apache.comons.dbcp.BasicDataSourceFactory".
    Does anybody know where the problem lies??
    Any help most appreciated.
    Cheers.
    Jan

    I'd like to access the same database from a
    standalone, command window program and have tried
    setting the INITIAL_CONTEXT_FACTORY and PROVIDER_URL
    properties as shown below.I've never done this. I'm not sure if it can or should be done.
    The problem is that the standalone app isn't part of any Tomcat context.
    It also ties your standalong app to Tomcat. I don't think you want to do that.
    There's got to be a way to manage this without resorting to Tomcat. I'd look at the Commons docs to see.
    If I copy the JAR file containing
    BasicDataSourceFactory (viz. commons-dbcp-1.2.1.jar)
    from Tomcat's common\lib folder into Java's
    jre\lib\ext folder, This is a terrible idea. You shouldn't be putting anything in jre/lib/ext - it'll cause more problems than it's worth.
    Create a /lib directory for your project and put the 3rd party JARs in there. Disk space is cheap, and keeping all the artifacts that you need to create your app in one place is a good idea.
    %

  • Inserting data into Ms Access via jdbc odbc connectivity

    Can anyone help dictate what's wrong with this below method which is supposed to be adding new record(append) into my ms Access Table. This is giving me a hell of problem, I thought I have everything well. The module is branched via a Swing ui. Can you debug this ? and send a new code to try?
    public void Query3(){
    try{
    //while(rs.next() )
    stmt.executeUpdate("INSERT INTO pupRegister_Table1 " +
         "VALUES ('1001', 'Simpson', 'Mr.', 'Springfield', '2001')");
    //stmt.executeUpdate ("INSERT INTO pupRegister_Table1 " +
    //"VALUES(var_firstname)");
    // Close the result set, statement and the connection
    rs.close() ;
    stmt.close() ;
    conn.close() ;
    } catch( SQLException se )
    System.out.println( "SQL Exception:" ) ;
    Thanks. Note I have done all the DriverManager stuff already and other modules like for displaying the records, do work fine.

    Thanks a lot,
    that contribution really helped but I realised that I Missed adding the
    insertRow();
    that did the trick and it works fine now
    Thanks
    Yet another issue is about inserting the current date into the date field having data type as date. Hence I am using the Jdbc stuff. I am having problem here
    any further help?

  • Command Window Database Access via a DataSource

    Hi.
    I've succeeded in accessing a MySQL database via a DataSource from a servlet that makes use of a DAO. However, I would now like to use the same DAO to access the database from a standalone, command window program.
    The error that I am getting is "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial". This error is generated by the second of the following two lines in the DAO:
    Context initialContext = new InitialContext();
    Context context = (Context)initialContext.lookup("java:comp/env");
    Is there any way in which I can get a standalone program to make use of my server.xml and web.xml DataSource mappings to access the database??
    Any help would be most appreciated.
    Thanks in anticipation.
    Jan

    The error that I am getting is
    "javax.naming.NoInitialContextException: Need to
    specify class name in environment or system property,
    or as an applet parameter, or in an application
    resource file: java.naming.factory.initial". This
    error is generated by the second of the following two
    lines in the DAO:
    Context initialContext = new InitialContext();
    Context context =
    (Context)initialContext.lookup("java:comp/env");
    The error itself suggests some solution to you. You need to specify the environment variables in the parameter to the InitialContext constructor. something like this...
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://localhost:7001");
    Context context = new InitialContext(env);Cheers!
    ***Annie***

  • Publishing reports to Enterprise - Remote database access.

    Enterprise newbie.
    I can publish a report that accesses a database residing on the same server as Crystal Enterprise. Under the CMC, report process, database, I'm using the default report DB connections option. It runs fine in the user mode.
    The Problem
    Attempting to publish a report accessing a database not located on the same server as Crystal Enterprise, I get theis error: " There was an error retrieving data from the server: The database logon information for this report is either incomplete or incorrect. "
    I've tried a number of variations on the process database setup and have established user accouts on the remote server, using that accout as the report user and pw under process - database. 
    Both reports created on my desktop with ODBC conections.
    I think I am missing some page or cache server set-up.  Any suggestions appriciated.
    Paul

    Hi,
    If the ODBC connection is set up properly then make sure the servers  in the CCM are running on the domain administrator account.
    Please revert in case of any queries

  • Access to Database Access from JDBC

    Hello,
    I have a RFC to JDBC scenario.
    The database is on a different machine to the XI, but from XI is going to map a drive to see the database.
    In the communication channel I specified the drive with the rest of the path:
    jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=Z:/TestDB.mdb
    and I get an error:
    com.sap.aii.af.ra.ms.api.DeliveryException: Database connection could not be established
    Is it possible to access an Access database that is not physically in the machine XI?
    thanks very much,

    hi silvia
    first, you need to install JDBC driver in PI to be able to connect to MS Access.
    please, see these links
    https://forums.sdn.sap.com/click.jspa?searchID=24103238&messageID=7100823
    Re: MS access o XI : External driverof access is required or not.
    Regarding File to JDBC/MS Access database
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f
    thanks
    PD:points if useful
    Rodrigo

Maybe you are looking for

  • Photo sync bug with Aperture albums?

    Hi, I think I have found a bug with how iTunes syncs photos across to my new (and until my number ports across, useless) iPhone. If you set it up that only selected Aperture albums are synced, like this; [ ] album1 [tick] album2 [ ] album3 [tick] alb

  • Lost ability to keep tabs on shut down

    until I did a recent upgrade I used to be asked if I wanted keep the tabs i had open. This is a great capability but it seems to have dissappeared. How to I get it back

  • Wanting to use a transparency in Premiere Pro CC but no luck

    Hello, I took a screen-shot of a clients logo that wants a video done then brought it into photoshop to erase the white background and saved it as a .gif but when I open it in Premiere Pro CC I still have the white background around it. Can anyone di

  • How to view what was returned in wwsec_api.person_info

    How would someone go about viewing what was returned in wwsec_api.person_info, I understand it returns a record but I'm not sure what the columns are other than a few that I figured out such as first_name, last_name.

  • Error Trying to upload file to PFCG Role

    I'm trying to upload a file to PFCG Role. The file is created through report CRMD_UI_ROLE_PREPARE. The generated file has a format like: FORMAT              1.2BNODE                0000200001     FOLDERTEXT                00002ESZWEBSALESPR3NODE