Re: Trying to create a database in a MS Access DB via JDBC drivers
From: Albretch (lbrtchx_at_hotmail.com)
Date: 07/25/04
- Previous message: Claudio Alberto Andreoni: "What about a new DB without SQL?"
- In reply to: Luca Paganelli: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Next in thread: Albretch: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Reply: Albretch: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Previous message: Claudio Alberto Andreoni: "What about a new DB without SQL?"
- In reply to: Luca Paganelli: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Next in thread: Albretch: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Reply: Albretch: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|