11
$\begingroup$

I cannot open a SQLConnection to a SQL vectorwise database and I assume the JDBC driver is the problem. A JAR file was provided to me - the only info additionally provided to me was the java class: com.ingres.jdbc.IngresDriver

What would I have to do to add it to the JDBCDrivers that Mathematica can use?

Hope this is sufficient information - please let me know, if more information is required.

Thanks and regards Patrick

$\endgroup$

2 Answers 2

9
$\begingroup$

Finally found the answer on how to connect MM to Actian vectorwise via SQL :)

Needs["JLink`"]
AddToClassPath["C:\\Users\\Desktop\\iijdbc.jar"];
Needs["DatabaseLink`"];

OpenSQLConnection[
 JDBC["com.ingres.jdbc.IngresDriver", 
  "jdbc:ingres://HOST:VW7/DATABASE;user=xxx;password=yyy"]]

Feeling good! Pat

$\endgroup$
4
$\begingroup$

In the case where you want to use an updated driver in preference to an older one shipped with Mathematica, AddToClassPath[ ...path..., Prepend -> True].

For instance to use xerial's up-to-date SQLite driver:

Needs["JLink`"]; Needs["DatabaseLink`"]; 
ReinstallJava[];
jdbcdriver = FindFile["my-path-to/sqlite-jdbc-3.32.3.2.jar"]
AddToClassPath[jdbcdriver, Prepend -> True];
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.