diff -r src/net/rkbloom/logdriver/LogCallableStatement.java ../logdriver-with-ms-1.0.0/src/net/rkbloom/logdriver/LogCallableStatement.java 39c39 < private LogConnection conn; --- > private Connection conn; 45c45 < public LogCallableStatement(CallableStatement cs, LogConnection c, String sql) { --- > public LogCallableStatement(CallableStatement cs, Connection c, String sql) { 65c65 < buildSQL = Util.buildSQL(sql, bindParams, outParams, conn); --- > buildSQL = Util.buildSQL(sql, bindParams, outParams); diff -r src/net/rkbloom/logdriver/LogConnection.java ../logdriver-with-ms-1.0.0/src/net/rkbloom/logdriver/LogConnection.java 31d30 < import java.util.Locale; 42d40 < public final boolean isMicrosoft; 49,54d46 < boolean isMS = false; < if (url != null) { < String urlLowerCase = url.trim().toLowerCase(Locale.ENGLISH); < isMS = urlLowerCase.indexOf(":sqlserver:") >= 0; < } < isMicrosoft = isMS; diff -r src/net/rkbloom/logdriver/LogPreparedStatement.java ../logdriver-with-ms-1.0.0/src/net/rkbloom/logdriver/LogPreparedStatement.java 37c37 < private LogConnection conn; --- > private Connection conn; 42c42 < LogPreparedStatement(PreparedStatement ps, LogConnection c, String sql) { --- > LogPreparedStatement(PreparedStatement ps, Connection c, String sql) { 61c61 < buildSQL = Util.buildSQL(sql, bindParams, null, conn); --- > buildSQL = Util.buildSQL(sql, bindParams, null); diff -r src/net/rkbloom/logdriver/LogStatement.java ../logdriver-with-ms-1.0.0/src/net/rkbloom/logdriver/LogStatement.java 34c34 < private LogConnection conn; --- > private Connection conn; 37c37 < LogStatement(Statement stmt, LogConnection c) { --- > LogStatement(Statement stmt, Connection c) { diff -r src/net/rkbloom/logdriver/util/Util.java ../logdriver-with-ms-1.0.0/src/net/rkbloom/logdriver/util/Util.java 9,10d8 < import net.rkbloom.logdriver.LogConnection; < 17c15 < public static String buildSQL(String sql, Map bindParams, Map outParams, LogConnection conn) { --- > public static String buildSQL(String sql, Map bindParams, Map outParams) { 30,43c28,30 < if (value instanceof byte[]) { < if (conn.isMicrosoft) { < buf.append( "0x" ); < buf.append( encode((byte[]) value) ); < } else { < buf.append("x\'"); < buf.append( encode((byte[]) value) ); < buf.append( '\'' ); < } < } else { < buf.append( '\'' ); < buf.append( value.toString() ); < buf.append( '\'' ); < } --- > buf.append( '\'' ); > buf.append( value.toString() ); > buf.append( '\'' ); 56,58c43,44 < public static void log( < Logger log, String type, String sql, long start, Throwable t < ) throws SQLException { --- > public static void log(Logger log, String type, String sql, long start, > Throwable t) throws SQLException { 104,124d89 < private static String encode(byte[] bytes) { < if (bytes == null) { < return null; < } else if (bytes.length == 0) { < return ""; < } < < StringBuffer buf = new StringBuffer(bytes.length * 2); < for (int i = 0; i < bytes.length; i++) { < byte b = bytes[i]; < int byteVal = b < 0 ? 256 + b : b; < String hex = Integer.toString(byteVal, 16); < if (hex.length() == 1) { < hex = "0" + hex; < } < buf.append(hex); < } < return buf.toString(); < } < <