Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create MSAccess file(.mdb) using java

 
Soumayajit Hazra
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create access database at runtime. For that purpose we need to create .mdb file runtime. How to do this? please help...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think it is possible to do this purely in Java. You could call an operating system script using Runtime.exec() and then use a batch/shell script.
 
Wei Dai
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Free solution: prepare a blank mdb file, then copy it as the destination file, then use dsn-less jdbc url to access it.
Commercial solution: use the CREATE DATABASE sql at http://www.hxtt.com/access/sqlsyntax.html#createdatabase .
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Jackcess library provides a pure-Java way to create, read and write MDB files in Access 2000 format.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic