Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Access DB

Status
Not open for further replies.

adrianjohnson

Programmer
May 16, 2002
145
GB
Is is possible to create a new MS Access DB in Java?

I need it for an application I'm building, where the users will need to store their data in an Access DB, and I'd rather they create new ones than having to all add their data in the same one.

Thanks,

Adrian Johnson
 
Thanks.

I am using JDBC to get data out of other sources. What I need are the commands to create a new Access DB - e.g. a database from scratch.

Thanks,

Adrian
 
Considering that using JDBC, you must connect to a database instance, you won't be able to use JDBC to create a new db, because there will be nothing to connect to !

I would suggest working out how to do your task using a native programme, or command, and then running that using Runtime.exec().

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
It's ok - I think I'll go the command route.

@sedj: do you know what the command is? I've posted the question in the Windows Forum (it's a Windows command isn't it?), but not much of a response yet.

Thanks,

Adrian
 
No, I never use Access. I would ask in the Access forum maybe ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
@Dian
I looked at them, but decided it wasn't the best route. I think using the Windows command will be better. Thanks, anyway though.
 
I know you can use ADOX to create one, but I don't know how you can use adox with java.

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
What my suggestion is to use VB 6 or VB .NET writes a code to create the MDB file(ADOX)and then use Runtime.exec() to call the program. You can pass a name peremeter as the MDB file name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top