Re: Trying to create a database in a MS Access DB via JDBC drivers

From: Albretch (lbrtchx_at_hotmail.com)
Date: 07/25/04

  • Next message: Alex Molochnikov: "Re: What about a new DB without SQL?"
    Date: 25 Jul 2004 11:32:36 -0700
    
    

    "Luca Paganelli" <ask@me.it> wrote in message news:<%WKMc.96219$G%.93611@tornado.fastwebnet.it>...
    > I think the problem is that
    > Access maps one database to
    > one file. With the odbc
    > bridge you can access to a db
    > either via DSN (see ODBC
    > sources) or by specifing
    > the actual file in which the
    > db is contained.
    >
    > Therefore it's not possible to
    > CREATE a new db.
    > You could try creating a new
    > .mdb file in the file system
    > and point the odbc bridge to
    > that file and finally start
    > creating TABLEs (and not
    > DATABASE).

     Yeah! I figured! I just wanted to have more input from experienced
    people.

     So, and this is also info 'for the rest of us', in order to CREATE a
    new db in Access you will have to:

     1._ know which version of Access you are working with

     2._ keep a blank (no tables, queries, . . .) copy of an ".mdb" file
    for this version

     3._ know which directory do you want the 'new' DB in

     4._ transfer the blank copy to this dir

     5._ rename the '.mdb' file to the name of the 'created' DB

     6._ define the DSN "on the fly" by passing all driver conf. settings
    (ODBC configuration params in this case) inside the connect string:

    con = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access
    Driver (*.mdb)};DBQ=C:/data/Access/<name>.mdb","<UsersId>","<password>");

     I think this is not a big deal at all and works on the OS level, so
    probably MS Access drivers should do that on their own. Wouldn't you
    agree?

     Why don't they?


  • Next message: Alex Molochnikov: "Re: What about a new DB without SQL?"

    Relevant Pages

    • Re: Nameless CREATE
      ... The starting point is either an existing database or one that is ... "Describe" involves issuing an SQLDescribeCol function to ODBC ... essentially much the same as character data type apart from all 8 bits ... ALTER TABLE tablename ADD COLUMN BinaryColumn BINARY ...
      (comp.lang.forth)
    • Re: fields queries and utter disaster
      ... Unfortunately the \c ODBC DATABASE field switch is not supported in Word ... of course supports ODBC connections but Word ... Mac Word Test ... suggests that it should be possible to use query files (cf. .qry/.dqy ...
      (microsoft.public.mac.office.word)
    • Re: [VW 7.3.1] ODBCConnection
      ... I played around with a few combinations on the connection string and ... with a trusted SQL Server connection. ... there are differences for database connects. ... > any database specific odbc drivers. ...
      (comp.lang.smalltalk)
    • Re: Serious Problem with Date in RecordSource
      ... Yes, this is ODBC data, not JET data, so some if the things I suggested ... >> c): Decompile the database. ... Still in the code window, choose Compile from the Debug menu. ... rather than allenbrowne at mvps dot org. ...
      (microsoft.public.access.formscoding)
    • Re: CDatabase, CDaoDatabase
      ... raw ODBC calls ... DAO will outperform ODBC (and so CDatabase) considerably in single user ... There is considerably more to database performance than making quick ...
      (microsoft.public.vc.language)