I'm using the Microsoft Office 12 beta release from Microsoft.
Using the Administration Tool for ODBC Data Sources in the Control Panel, I created a DSN to connect a brand new database to store messages to my web application, which is a message board (duh!). (The DSN created was a user DSN).
However, when I run my application using Apache Tomcat, I get the following exception :
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I have cross checked my connection string and it's perfectly fine (matching DSN name, username and password).
I used the Microsoft Access Driver (.mdb) in the ODBC Data Sources Administration Tool [Control Panel>Administrative Tools>Data Sources (ODBC)] in my first attempt to hook up the database with a DSN name. I then used the Microsoft Access 12 Driver (.mdb, .accdb), but still to no avail.
When I clicked on the "Advanced" tab while setting up the DSN, I found that the Driver field (which comes under the fields used to set a username and password for the database) was indeed blank. Could this have anything to do with the exception or is it just that Microsoft Access 12 is not supported by the current JDBC version?
Thank you to anyone who helps with this in advance. Appreciate it...
Joined: May 22, 2006
Well, here's yet another case of the problem being solved before anybody actually got to it! I used System DSN to set my DSN, and it worked!
But now I have another problem : An Invalid cursor exception
The source code of my message board application is HERE
Before you run the application, please ensure that the tables are created by running the CreateMessageBoardTables class file.
Please locate the : MsgBrdv1\WEB-INF\data folder and place an MS Access database there. Also name the DSN messageBoardDB, with the username : myUsername and Password : myPassword (that's how I've set the connection string, feel free to modify it if you like to )
If all goes well, you should be able to run the application. While you can register users and post/delete messages, you cannot view message threads because of the Invalid cursor exception.
I think it is far too demanding to ask somebody to download your entire application, configure it, and run it. I for one am not going to do that. A better way to approach the problem would be to write a small application that tries to read an Access database. Shouldn't be more than 50 lines of code. Then post it here together with a description of the problem -- exact error messages, line of code that threw exception, and so on.
Thanks for looking into this. My application isn't daunting at all for a fairly experienced Java professional...on the contrary, I think you'd find it quite amateurish
I will try out the suggestions provided in any case and see if it solves the problem. I have no issues in writing user information to the database, but the program fails when it tries to retrieve threads.
Joined: May 22, 2006
My apologies for being ambiguous : by "thread" I meant a forum thread, not the conventional Java thread.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Error trying to connect MS Acess 12 database