Blog Archive for May 13, 2011

Writing to an Oracle CLOB from Java

May 13, 2011

This code inserts a row into an Oracle table including writing a CLOB. Note that the CLOB isn't inserted normally, but a blank one is inserted and then updated.

final String lSql = "INSERT INTO applications (app_date_time, key, application_data) values (SYSTIMESTAMP,?,?)";
PreparedStatement lStatement = null;
CLOB lTempClob = …

Popen and Django Dev Server

May 13, 2011

I have code that does this:

lCommand = ["hg","history", "-r", "%s:%s" % (pFrom, pTo)]
lProcess = subprocess.Popen(lCommand, stdin=subprocess.PIPE, stdout=subprocess.PIPE)

in a Django view. …

Tags: