/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package koerapakett; import java.sql.*; /** * * @author turing */ public class tabelinaitaja { String sqllause; Connection looYhendus() throws SQLException{ return DriverManager.getConnection( "jdbc:derby://localhost:1527/sample", "app", "app"); } public void paneLause(String uuslause){ sqllause=uuslause; } public String andmedTabelina(){ try{ if(sqllause==null){return "SQL lause puudub";} StringBuffer sb=new StringBuffer(); sb.append("
| "+rms.getColumnName(i)+""); } sb.append(" | 
| "+rs.getObject(i)+""); } sb.append(" |