Posts Tagged ‘database’

Script Oracle and Mysql from Jython

Posted on August, 10 at 6:28 pm | Filed Under Jython, Python, Software

Here are a couple of links to articles on how to use Jython to script oracle. Andrew has this example and Adam has this other example. See also my earlier post on how to script mysql from Jython.

Read More>

Jython MySQL Sample using JDBC

Posted on June, 15 at 9:22 am | Filed Under Jython, Python, Software

Here is a quick sample jython script to query a MySQL database using the mysql jdbc driver. Make sure that the jdbc driver is in your classpath and available to jython. from java.lang import * from java.sql import *driverName=”com.mysql.jdbc.Driver” Class.forName(driverName) url = “jdbc:mysql://localhost/mydatabase?user=myuser&password=mypassword” con = DriverManager.getConnection(url) stmt = con.createStatement() sql = “select column from table [...]

Read More>