Connection JDBC -> Navision

Can somebody send me the Source-Code from a JAVA-programm that connect a Navision Database with JDBC and C/ODBC? Thanks Mathes

What is the (intended) purpose of the JAVA program? Reading? Writing? Both? Connection through webpages on inter/intranet? Then use a JDBC-ODBC Bridge program (see for free demo). With a decent programming environment (i.e. JBuilder), you have the tools for building the straight connection, in the form of Data Controls. These are fairly simple to configure to make the connection, then it depends on what you want to do with the data how complicated it gets. But, down to the bare bones, it are SQL statements/queries that perform the action. John

I only try to program a simple read-connection like “SELECT * FROM Customer”. I tried it with ACCESS and it works succesfull, but not with NAVISION. I always get this error: java.sql.SQLException:[Navision Software a/s][Navision Financials ODBC Driver] ISAM error S0000 4 I´m using the C/ODBC 2.50 Driver and the JDK 1.3 Some tips? Mathes Edited by - Mathes on 11/30/00 2:57:11 PM

Which URL do you use to connect to c/odbc. When I try to connect using jdbc-odbc brige, i get this error : DriverManager.getConnection(“jdbc:odbc:navision”) registerDriver: driver[,] skipping: driver[,] trying driver[className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@b66cc] skipping: driver[,] skipping: driver[,] skipping: driver[,] skipping: driver[,] trying driver[,] getConnection: no suitable driver Navision server and c/odbc are well installed. Thanks,

You did configure a (System) DSN through the ODBC setup utility in the Control Panel, didn’t you? That DSN is what your bridge should be using to make the connection. As said, we have good experiences with the JDBC-ODBC Bridge from EasySoft, which we access by a couple of Java Beans through JSP pages. John

Hi John, can you send me a part of your JSP-Code please? I need the part with the connection to the Financials.-Database and the SQL-Querry. If it is possible, please send me the code to Thanks Mathes

As said, we are using the JDBC-ODBC Bridge software from EasySoft UK. It’s not for free, but gives a good performance and lots of attractive features. Get yourself a free demo from The way we use to make a connection is through a JAVA class is as follws (hope the indenting survives the copy/paste): import java.sql.*; /** Connection object class */ public class WebShopConnection { private static Connection commonDataSource; public static Connection getDataSource() throws SQLException { if (commonDataSource == null) { try { java.util.Properties info = new java.util.Properties(); // Add “user” key/value pair info.put(“user”,“webshop”); // Add “password” key/value pair info.put(“password”,“webshop”); try { Class.forName(“easysoft.sql.jobDriver”).newInstance(); } catch(Exception ex) { ex.printStackTrace(); return null; } // Now establish connection with via the Driver manager String url = “jdbc:easysoft://”; commonDataSource = DriverManager.getConnection(url, info); } catch (SQLException e) { e.printStackTrace(); throw e; } } return commonDataSource; } On the Easysoft page you can find a sample applet to make a connection also. John }