Connect to remote Access database

Hi there,
Can any one tell me how to connect to the remote MS Access? The scnario is:
Suppose there is a web server with IP 215.167.16.89. The JDBC driver (assumed to be JDataConnect) is installed on this machine. How to use this web server to connect to the Access database called db1.mdb with DSN 'db1' held in the maching with IP 165.247.17.43?
The Jave connection codes I am using are:
String url=new String ("jdbc:JDataConnect://165.247.17.43/db1:username:password");
try{
drvDriver=(Driver)Class.forName("JData2_0.sql.$Driver").newInstance();
conConnection = drvDriver.connect(url, new Properties());
showMessage("Connected to Company2 Database");
Why can I not connect to the db1 database?
If I use these codes to connect to the database in the same machine as the web server without specifying the IP address, it worked.
String url=new String ("jdbc:JDataConnect:db1:username:password");
Thanks in advance.

Thanks for the help.
So you need to give a full path of it as if you are accesing
through windows explorer.I am not sure how to give a full path. Can you give me the detail please?
What happens when you have two or more .mdb with the
same name in different directories in that ip address.
Since its a file... you need to access it as a file.I think we can specify the different DSN for the two or more .mdb databases.
Thanks.

Similar Messages

  • Connecting to an access database

    I am trying to connect to an access database using asp.net
    vb.
    I am getting a "unidentified error".
    Any suggestions?

    1. Post code for how you're connecting
    2. Post procedure you went through to get that code
    "sabafana" <[email protected]> wrote in
    message
    news:e4krqh$h07$[email protected]..
    >I am trying to connect to an access database using
    asp.net vb.
    > I am getting a "unidentified error".
    > Any suggestions?

  • Connect to Remote Oracle Database

    I am unsuccessfully trying to connect to remote Oracle database using OleDB/ODBC/Oracle Client.
    Do I have to install Oracle Client in order to use those drivers and which version?
    I would really appreciate any help. THANK YOU!

    Marina,
    Please refer this question to the general Installation forum. Thanks!
    The short answer is yes, you need to have the Oracle client software installed.

  • Using JSP to connect to an Access Database

    I need help on using JSP to connect to an Access database.
    This is the code I currently have connecting to a mySQL DB. I need to change it to connect to an Access DB. The reason I am switching DB's is because mySQL is no longer going to be carried by my host.
    Here is the code:
    <html>
    <head>
    <basefont face="Arial">
    </head>
    <body>
    <%@ page language="java" import="java.sql.*" %>
    <%!
    // define variables
    String UId;
    String FName;
    String LName;
    // define database parameters
    String host="localhost";
    String user="us867";
    String pass="jsf84d";
    String db="db876";
    String conn;
    %>
    <table border="2" cellspacing="2" cellpadding="5">
    <tr>
    <td><b>Owner</b></td>
    <td><b>First name</b></td>
    <td><b>Last name</b></td>
    </tr>
    <%
    Class.forName("org.gjt.mm.mysql.Driver");
    // create connection string
    conn = "jdbc:mysql://" + host + "/" + db + "?user=" + user + "&password=" +
    pass;
    // pass database parameters to JDBC driver
    Connection Conn = DriverManager.getConnection(conn);
    // query statement
    Statement SQLStatement = Conn.createStatement();
    // generate query
    String Query = "SELECT uid, fname, lname FROM abook";
    // get result
    ResultSet SQLResult = SQLStatement.executeQuery(Query);
         while(SQLResult.next())
              UId = SQLResult.getString("uid");
              FName = SQLResult.getString("fname");
              LName = SQLResult.getString("lname");
              out.println("<tr><td>" + UId + "</td><td>" + FName + "</td><td>" + LName
    + "</td></tr>");
    // close connection
    SQLResult.close();
    SQLStatement.close();
    Conn.close();
    %>
    </table>
    </body>
    </html>
    Thank You,
    Josh

    <%@ page language="java"%>
    <html>
    <head>
    <title>
    First Bean
    </title>
    <%@ page import="java.sql.*" %>
    </head>
    <body>
    <p>
    <%!
    Connection con;
    Statement st;
    ResultSet rs;
    String userid;
    String password;
    %>
    <%!public void db(JspWriter out)
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:phani");
    catch(Exception e){}
    try{
    st=con.createStatement();
    rs=st.executeQuery("SELECT * FROM login");
    while(rs.next())
    userid=rs.getString("userid");
    password=rs.getString("password");
    out.println(userid);
    out.println("</br>");
    out.println(password);
         out.println("</br>");     
    }catch(Exception e){}
    try{
    con.close();
    }catch(Exception e){}
    %>
    <%db(out);%>
    </p>
    </body>
    </html>
    phani is dsn name
    login is table name
    Good luck
    phani

  • Trying to connect to an Access database

    Post Author: robert693
    CA Forum: Deployment
    Hello,
    I am trying to use Crystal to create reports out of an Access database. When I try to connect to the database thru the database expert, I go to Create Connection and choose Databse Files. I choose a database that is in My Documents. I get an error that says "Failed to load database information," and then "Unknown Query Engine Error." I was wondering what I have to do to connect to the Access database.
    Any help would be greatly appreciated!
    Robert 

    Post Author: [email protected]
    CA Forum: Deployment
    I connect to Access by first creating an ODBC connection to it and then have crystal use the ODBC.

  • DW Procedures to connect to MS ACCESS database located on remote server

    I am confused about the procedures within Dreamweaver CS3 to connect to a MS ACCESS database on a remoter server.
    I am working through a tutorial book, "Dreamweaver 8 with ASP, Cold Fusion and PHP Training from the Source", but the instructions are unclear concerning the procedures to connect to a MS ACCESS database located on a remote server. 
    The book indicates that the server administration has to create the DSN for you and screen shots indicate that you will result in a list of DSNs to choose from when creating the connections .asp file.
    I went through the procedures to create a connections .asp and resulting in a connection without and tables (of course) because I do not initially have any connection information from my remote site.
    I have generated the required two lines of code as follows for my MS ACCESS database connection on my remote server:
    'Database connection info and provider
    strCon="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&_
    Server.MapPath("database\trans.mdb") & ";" &_
    "User ID=xxx;Password=xxxxx"
    The question that I have is:
    How does this connection coding relate to the "connections/conn_newland.asp" file that was create within the Dreamweaver screens?  How do I merge the ASP coding?  The file (/connections/conn_newland.asp) generated within Dreamweaver is as follows:
    <%
    'FileName="Connection_odbc_conn_dsn.htm"
    'Type="ADO"
    'DesignationType="ADO"
    'HTTP="true"
    'Catelog=" "
    'Schema
    Dim MM_conn_newland_STRING
    MM_conn_newland_STRINT = "dsn=newland;"
    %>
    Any advice would be appreciated.  I know that this is simple but debugging an error from an  ASP coding merge would be a "bear" to debug!

    I have not used MS Access myself (fortunately) but I believe it works much like the old, old way of achieving a multi-user database in FileMaker.
    That is, it is not a true client-server database but more a peer-to-peer database and that each peer opens the same database file which is available to multiple user via file sharing. Therefore as elikness said it should just be a matter of putting the files on your Lion Server and then sharing that folder/volume using SMB sharing.
    However one thing to be aware of, since MS Access is not a true client-server database I would imagine it uses record locking to manage simultaneous direct access to records in the same files. File or Record locking is something that has historically been a bit flakey when using Windows clients with a Mac file server (and probably vice versa).
    While I am not proposing it as a solution to consider seriously, it is worth you knowing that FileMaker Pro is a database system that is available for both Mac and Windows and depending on how you configure things can be considered to stretch from a configuration very similar to MS Access at the low end all the way to a high-end MS SQL Server style setup at the top end. See http://www.filemaker.com for details.
    There is also a a third-party tool available for migrating databases to or from FileMaker Pro and it can convert MS Access databases to FileMaker Pro see http://www.fmpromigrator.com/
    You could use FileMaker Pro just on Windows machines if you wish.

  • Remote access database using EM Database Control Console

    When I install the Oracle database 10g, it gives me two choices:
    1)Using Grid Control for Database Management and
    2)Using Database Control for Database Management.
    When I select the #2, according to the Guide, I'll be able to manage my database locally. (Assume the database server's IP address is: DB_IP_Address, then I can use: http://DB_IP_Address:5560/em). But wait a minute___
    a)What does this "locally" mean? If the Oracle DB is installed in a remote location, and there is no LAN connection to it, can I still access it via the Oracle Enterprise Manager (Database Control Console)? (i.e., via the HTTP protocol)
    b)The same question is asked for the iSQL*Plus in regarding to the remote access. I guess the answer to a) above will automatically answer the b) ? (Actually I doubt that I can access remote database using the iSQL*Plus via HTTP protocol).
    Thanks
    Scott

    Hi,
    and there is no LAN connection to itWell you'll need some network link in order to connect successfully.
    What is meant by locally is that you can only manage databases installed on the local computer.
    For example if you installed it on machine "CPTR1", and on another machine "CPTR2", then you can't use http://cptr1:5560/em to manage the databases on "CPTR2. And vice versa.
    About iSQL*Plus, in fact, as far as the tns alias is ok from "CPTR1", you can connect to the databases on "CPTR2", "CPTR3", ....
    HTH,
    Yoann.

  • Error while making connection with remote oracle database

    Dear,
    I am trying to make connection with oracle database but when i run java file it's raise an error "classnotfoundexception oracle.jdbc.driver.oracledriver"
    DriverManager.getConnection(
      "jdbc:oracle:thin:@erp:1521:ORCL", "apps",
      "apps");
    Pls any body have idea.
    Thanks.

    Thanks for support.
    Below is error which i am getting while making connection with remote database.
    C:\Program Files\Java\jdk1.7.0_05\bin>java OracleJDBC
    -------- Oracle JDBC Connection Testing ------
    Where is your Oracle JDBC Driver?
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
            at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:186)
            at OracleJDBC.main(OracleJDBC.java:13)
    Advice.

  • How to connect to ms access database in jdbc

    i want to connect to my ms access database located in my c:\tapi\dbexperts.mdb. please help me construct the connection string. thanks in advance for your help.

                   String database = "c:\\tapi\\dbexperts.mdb"; /* change it*/
                   String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" + database + ";DriverID=22;READONLY=false";
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection(url);

  • Need help connecting a remote MySql database from Iphone

    Hi, i need to connect to a remote MySql DataBase in windows from IPhone but..... i'm a noob with Xcode and Objective-C.
    Can someone help me or explain me the way to do it plz?
    Message was edited by: Krovax87
    Message was edited by: Krovax87

    I do not think MCPKit will help you on the iPhone. It is just an Objective-C wrapper around the standard mysql libraries which are not available for the iPhone. Your best bet would be to post on the mysql forums and see if you can get any help.
    You can try extracting the mysql client library source code into a separate static library project, and see if you can get it to build for the iPhone.

  • Exception connecting to MS Access Database.

    I'm having problems using the jdbc-odbc bridge with an MS Access database and a file DSN. If I use a system DSN, it works fine but it does not seem to find the file DSN for some reason (And I HAVE to use a file DSN in this instance, for reasons I won't bore you with) - this is the error-message:
    "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
    This is my example code:
    import java.sql.*;
    public class SamplePgm {
    private static Connection con;
    private static Statement stmt;
    private static ResultSet result;
    public static void main(String[] args) {
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:Testing", "", "");
    stmt = conn.createStatement();
    result = stmt.executeQuery("select TOP 3 emp_no from employee");
    while (result.next()) {
    System.out.println(result.getString("emp_no"));
    } catch (Exception e) {
    e.printStackTrace();
    } finally {
    try {
    result.close();
    stmt.close();
    con.close();
    } catch (SQLException e) {
    e.printStackTrace();
    The file DSN was set up using the Win2K ODBC administrator.
    Is there any other way to tell ODBC that it's using a file DSN ?
    I'd be very grateful for any/all assistance.
    Thanks.

    My guess would be that a file DSN is stored in a file, a system DSN is stored under the HKeyLocalMachine registry key and a user DSN is stored under the HKeyCurrentUser registry key, but it's only a guess.

  • How to connect with Microsoft Access Database with JAVA

    I want to know the command and query to connect between MSAccess and JDBC.
    Is it beter way to make connection with MSAccess comparing with other Databases such as SQL and Oracle.
    Which Database will be the best with Java?
    I also want to know to be platform indepadent which database is suitable?

    On Windows, you can use MS Access database by:
    Set up a System Data Source using the ODBC control panel applet.
    Use the jdbc:odbc bridge JDBC driver, and specify a jdbc url that points to the data source name you just specified.
    It's been too long since I've done this, so I don't remember the syntax of the jdbc url, but I'm sure that if you do a search for the jdbc:odbc bridge that you will find what you are looking for.
    As far as the question about which database is best, you will need to determine that based on your project requirements.
    If you want a quick and dirty, open source, cross-platform database, take a look at HyperSonic SQL.
    - K

  • Sqlplus to connect to remote oracle database server

    Hi,
    I have oracle 10g database server on solaris 10 and I usually connect using my solaris account and run sqlplus on the server itself. this works !
    I have downloaded and installed oracle instant client for solaris 64 and I can run sqlplus command but I am confused on what should be the syntax on the command to connect to remote solaris 10 databse server where I have both system and oracle account.
    I have tried sqlplus help but still I could not get correct sysntax which could be used to authenticate myself to oracle server.
    I tried
    sqlplus user@hostname:1512/SID
    then it asked for password but when I typed password and pressed enter, it gave some error
    but it again asked for username so I type user@SID and then password prompt - typed password and this works!
    so I don't understand what should be the correct syntax so that in the first attempt only I am able to connect.
    if possible please give the exact command with realworld examples,(I have tried with sqlplus -help already)
    Thanks in advance.

    wonder what if I did not have tnsnames.ora on the client machine, how will be the syntax?You generally need (or at least strongly want) a tnsnames.ora file on the client machine.
    - You could configure Oracle Internet Directory and let that product provide TNS alias resolution for the organization (similar to setting up DNS for a local network).
    - Many tools (I haven't personally tried SQL*Plus and it may be version dependent) allow you to specify the entire TNS alias from the tnsnames.ora file (i.e. everything after the abcd.domain.com = entry) but that is hugely cumbersome to type
    - Depending on the Oracle client version, the sqlnet.ora file, the complexity of your configuration (i.e. if you are trying to use more sophisticated features like failover), you may be able to use the EZConnect syntax
    sqlplus username/password@host:port:SID/service_nameWhere host is the server that the database is running on, port is the port the listener is listening on (i.e. 1521 by default) and SID/service_name is the SID or service name you're trying to connect to.
    Justin

  • Breaking the Sharepoint connection within an Access database

    We have recently changed our online database to a new system. We downloaded all the current information into excel or access. However my major database to track all staff training, mandatory renewables and policy reviews will not allow attachments to be
    uploaded to the access database because "the sharepoint table is no longer available". We have had many problems with sharepoint, and wish to convert the database strictly to access and break the sharepoint connection to the former website. Is there
    a way to do this?
    Please advise

    Hi
    This is the forum to discuss questions about  Access develop. For your question is SharePoint related, I am moving this thread to the SharePoint forum
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share
    their knowledge or learn from your interaction with us.
    Thank you for your understanding.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • CONNECT BI7 TO ACCESS DATABASE

    <Moderator Message: Don't use upper case letters; Don't request documentation or links; Search the forums; follow the rules>
    Hello,
    Is it possible to connect Microsoft Access database to BW.
    Should i use DB connect or UD connect.
    If someone could provide simple documentation
    thanks for you help,
    Edited by: Siegfried Szameitat on Dec 9, 2008 12:02 PM

    Hi there!
    I think data binding is being added to netbeans 6 next year, otherwise you will have to use JDBC to access the database and call setText for the field with the data you get out of the db (manual coding). Google for the jdbc odbc bridge for accessing Access DB.
    For data binding you can use Swing X http://www.swinglabs.org/projects.jsp, as long as you don't mind writing code by hand.
    In the mean time, if you really want to do the binding using drag and drop you can use the Visual Web pack for netbeans 5.5 and create a web based app with data binding. If you wait a week or two the final version (preview can be downloaded at the moment) of the web pack should be released.
    Sorry about the tone of the other guy's comment, it seems that Java programmers are traditionally hostile towards VB guys and how they view the world ;)

Maybe you are looking for