package acspg; import java.sql.*; import java.io.*; import javax.mail.*; import javax.mail.internet.*; import java.util.*; import javax.activation.*; import nsjava.*; public class Pg_Query extends NsPg { public Pg_Query() throws SQLException { super(); } public Pg_Query(String poolname) throws SQLException { super(poolname); } public String databaseToJavaString(String q) throws SQLException { String r = null; NsLog log = new NsLog(); NsSet selection; log.write("Debug", "q = " + q); selection = this.select(q); if(selection != null) { if(this.getrow(selection)) { r = selection.value(0); } else { selection.free(); } } return r; } public void executeUpdate(String sql) throws SQLException { this.dml(sql); } }