This content has been marked as final. Show 3 replies
If you are using 32-bit Java on 64-bit Windows you need to define a DSN using the 32-bit ODBC driver in the ODBC Data Source Administrator.1 person found this helpful
Could I point out a few bad practices in your posted code?
(1) Using scriptlets in a JSP.
(2) Using the JDBC-ODBC driver to access a database other than MS Access.
(3) Generating SQL via string concatenation instead of using a PreparedStatement.
I'm also willing to guess that you have done these further bad practices, although your posted code doesn't clearly demonstrate them:
(4) Storing passwords in clear-text in the database.
(5) Failing to close your connections in a finally-block.
As you say, you are learning Java-based web technologies. But really, you have started out quite badly. I would suggest you seek out some more experienced supervision to lead you into better habits.
Thanks for the hint. I was using 32 bit Java & 32 bit Tomcat. Using 64 bit versions the error is no more seen.
Few more info:
Thanks for the detailed suggestions too. Unfortunately it happened to be my first jsp & was trying to extend a java program and see the outcome.