KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nilostep > xlsql > sql > mysql > xlMySQLSelect


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

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

16 public class xlMySQLSelect extends xlSqlSelect {
17     
18     
19     /** Creates a new instance of xlMySQLSelect */
20     public xlMySQLSelect(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