connecting to specific access database file

Discussion in 'Java' started by ali, Dec 26, 2004.

  1. ali

    ali Guest

    hi there again hope you are not getting bored from my questions

    first a lot of thanks to Ryan Stewart and Chris Smith for their link on
    my last question about how to connect my programe to access database

    i really learned a lot from there

    but still

    i hope there is a way to connect my programe to an specific database
    file so i dont have to make dns settings

    like making my program connect to the file labs.mdb which is in its
    diroctry

    as it is made via visual basic by datacontrol
    so hope there is a way to do that in java
     
    ali, Dec 26, 2004
    #1
    1. Advertising

  2. ali

    Chris Smith Guest

    ali <> wrote:
    > but still
    >
    > i hope there is a way to connect my programe to an specific database
    > file so i dont have to make dns settings


    Unfortunately, if you're using the ODBC bridge driver, there's no really
    reliable way to make the connection without defining an ODBC data source
    name. ISTR that you can use something like:

    jdbc:eek:dbc:MS Access Database;file=c:\myfile.mdb

    but that assumes that the default ODBC name for a generic Access
    database is present and hasn't been modified. That's not necessarily a
    safe assumption. I'm also not sure of the attribute name, and it might
    be something other than "file". Also, If you take the approach above,
    remember that backslashes should be escaped in a string literal.

    I mentioned earlier that there's a free edition of MS SQL Server that
    has a better JDBC driver. Could you consider using that instead?

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Dec 26, 2004
    #2
    1. Advertising

  3. ali

    ali Guest

    thanks a lot again
    jdbc:eek:dbc:MS Access Database;file=c:\myfile.mdb
    worked very well thanks again


    but yes its not garenteed to work on all the computer

    so about MS SQL Server that you told me about can you tell me more as
    i said i am very new to database thing so i only know very little about
    ms access it self but hope you will provide me with good sources so i
    can undestand MS SQL Server

    and also where to get it from how it is better and does it provide me
    in java what i need ??!!!
     
    ali, Dec 27, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Wild
    Replies:
    1
    Views:
    10,952
    Kevin Swarts
    Aug 25, 2003
  2. Bart Schelkens

    Connecting to an Access-database

    Bart Schelkens, Nov 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    422
    Bart Schelkens
    Nov 19, 2004
  3. Nathan Sokalski
    Replies:
    9
    Views:
    464
    Steve Long
    Jun 8, 2005
  4. Krish
    Replies:
    3
    Views:
    633
    Phlip
    Oct 19, 2004
  5. Replies:
    1
    Views:
    100
    Mark Clements
    Jan 20, 2007
Loading...

Share This Page