1

I'm using NetBeans 8.0 and i have already created Data source (DNS). its name ackDB. This is my code (JSP)

<body>
    <%@ page import="java.sql.*" %>

<%
        Connection con = null;
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        String url = "jdbc:odbc:ackDB";
        con = DriverManager.getConnection(url);
%>
</body>

That will show me an error

enter image description here

how to fix this. please help.

ViSTA
  • 196
  • 1
  • 1
  • 7

1 Answers1

1

The error message says your machine architecture doesn't suits with existing driver version. you need to download a different version of Odbc driver.. In case of your attempting to connect from 64 bit OS.

Learn More ..

And this thread may help you

Community
  • 1
  • 1
Santhosh
  • 8,181
  • 4
  • 29
  • 56