have been requested by a friend to replace the interface of his application as at the moment he is making use of Access. In order not to go through a lot of hassle, I am going to use the same database and change the interface to Java. However an issue that I have encountered is the saving of file in Access database directly, something that is easily done in Microsoft Access itself.
Glad if someone may give me some hints/sources or ideas on how to handle this as I do not have any idea of what it entails to implement it.
What JDBC driver are you using for this?
That (might) affect what functionality you can use.
When you say "saving a file", do you mean as bytes rather than the text?
In otherwords, as a BLOB rather than a CLOB.
posted 1 year ago
Hi Dace Tolls,
at this point I am at the research stage and since this is the first time I need to do this, I am investigating what possibilities exist as I do not want to waist a lot of time in finishing everything without resolving this problem.
For saving a file I mean storing the file in the access table similar to what one may do on Access since I need to integrate the application to the current db and provide also the current file viewing functionality.
So by "file" you do not mean a file in the common sense, but rather all the data in the Access DB?
I find the approach strange, or maybe I'm not understanding correctly what you propose to do: you want to use Access as the DB, but not as the GUI, correct? That doesn't make sense to me: with Access, the GUI is the DB, more or less. If you don't want to use the GUI, there is no point in using Access as the DB, either. There is, however, the Jackcess library which has an API for Access files, if you wish to develop the GUI in Java (using the Swing or JavaFX APIs). or, if you have money to spend, there's the HXTT JDBC driver for Access.
posted 1 year ago
Well, you'll need a driver (Tim has suggested a couple).
Looking at some Access docs and the column type for binary data would be BIGBINARY I think.
So now I'm fairly certain that Terence means just what they say about saving a file in an Access database. I'm also fairly certain that JDBC doesn't have any features which remotely support getting those files back out of the Access database.
At least I was fairly certain until I tried the obvious Google search and came up with a question in another forum to which the answer was to use the UcanAccess JDBC database driver.