• 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
Sheriff
Posts: 36023
429
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: 42970
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!