KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nilostep > xlsql > sql > mckoi > xlMcKoiSelect


1 /*
2  * xlQueryHsqldbForExcel.java
3  *
4  * Created on 9 juli 2004, 13:20
5  */

6
7 package com.nilostep.xlsql.sql.mckoi;
8
9 import com.nilostep.xlsql.sql.xlSqlSelect;
10 import java.sql.*;
11
12 /**
13  *
14  * @author Jim Caprioli
15  */

16 public class xlMcKoiSelect extends xlSqlSelect {
17     
18     
19     /** Creates a new instance of xlMcKoiSelect */
20     public xlMcKoiSelect(Connection con) {
21         super(con);
22     }
23     
24     public ResultSet QueryData(String JavaDoc workbook, String JavaDoc sheet)
25                                                         throws SQLException {
26         Statement s = jdbc.createStatement();
27         String JavaDoc sql = "SELECT * FROM " + workbook + "." + sheet;
28         return s.executeQuery(sql);
29     }
30 }
Popular Tags