0

I am studying Information Technology at a local college. I am currently doing a Java project for one of my Modules. We are expected to make a Java application that communicates with a Microsoft Access database. I am working in a group, and all of us are assigned to code separate functions of the software. However, we need to share one database. We are currently using ODBC on our individual computers and are using JDBC to connect to the database on the local machine. What we have thought is to just work on separate Microsoft Access databases and then just combine them later on. But I think that's not the best way. Is there a way that will allow me and my group members to have a centralized database, to which all of us can connect and make our queries? Is this possible by hosting the Microsoft Access database somewhere online, and then connecting to it from inside the Java software. Please help me out, as I have no idea how to get a centralized Microsoft Access database.

Fionnuala
  • 90,370
  • 7
  • 114
  • 152

1 Answers1

0

If you want to get rid of this by using Microsoft Access is because that's the easiest way out for you and your group to solve this kind of problem but I'd rather suggest you to use the database using a database provided by Java Derby database, it's quite help you to short your code within the server. Maybe I will suggest you to use Netbeans as a GUI and the Derby to control the database.

So what's your core problem is that a programming side or configuration and control within the hosting ? Thanks

  • Okay, I understand what you mean. I searched around and figured out the server/client nature of Derby databases. I think, after reading around, I know how to connect to it. But I am not so sure about the configuration and control with the hosting. How do I put up a Derby database on my host, and then have a link that connects to it? For example if I run Derby on my local machine, I get a localhost address. Can I upload it to my host and get a link to the database that me and my group members can share while making the connection our from our code? Any help will be appreciated. Thanks! – Adeel Ateeque Dec 19 '11 at 10:05
  • @AdeelAteeque I do not think that this is a good idea. There are only 334 posts tagged `derby`on Stackoverflow. Learning it may not be career-enhancing. If you need a common, free, server-based database, consider MySQL and SQL server Express. – Fionnuala Dec 19 '11 at 15:53
  • @Remou Just wanted to ask, is it completely impossible to setup a centralized database with Microsoft Access? – Adeel Ateeque Dec 19 '11 at 16:45
  • You can have a centalized MS Access database on your own network, you can even use MS Access with web pages (http://support.microsoft.com/kb/253580), but connecting to Access across the internet in the way I think you mean is not possible. It is file based, so there is no server to connect to. You could use VPN, but I do not think that is what you want. – Fionnuala Dec 19 '11 at 16:50
  • I see... I think I will just give up on having a centralized database. I have a question for you. Suppose me and my group finish the Java project and have an Access database configured as the data source. Now if we'd want to distribute the Java application, do we have to provide the Access database with it and expect the client to configure ODBC on his local machine to use the application? Sorry for asking such questions, as I am still in my 1st year. – Adeel Ateeque Dec 19 '11 at 18:06
  • I would take different route though why not use a source control repository like cvs/subversion, this way if any body changes access db file they will put it back in repository and all of you will be using a latest version of access db file and will be in sync. As for odbc connection to create it on the fly you have to change the registry on the machine, it is possible to do but not an easy task but and i will give you +1 for thinking about distribution, good luck with script – Prasanna Talakanti Dec 19 '11 at 19:36
  • You are wandering into areas where I cannot help, however, it seems that you can use a DSN-less connection, which, hopefully, means that the end user does not have to do much : http://www.rgagnon.com/javadetails/java-0345.html – Fionnuala Dec 19 '11 at 19:39
  • This may be useful: http://stackoverflow.com/questions/5016730/creating-a-dsn-less-connection-for-ms-access-within-java – Fionnuala Dec 20 '11 at 10:45