1/**
2 * Copyright(C) 2005
3 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4 *
5 * Permission to use, copy, modify, and distribute this
6 * software and its documentation for EDUCATIONAL purposes
7 * and without fee is hereby granted provided that this
8 * copyright notice appears in all copies.
9 *
10 * @date : February 1, 2005.
11 * @author : Salih Yurttas.
12 */
13
14
15package dbops;
16
17import java.sql.*;
18
19public class DBTable {
20
21 private Connection con;
22
23 public DBTable(Connection con)
24 throws SQLException
25 {
26 this.con = con;
27 }
28
29 public boolean setStatement(String table)
30 throws SQLException
31 {
32 Statement st = con.createStatement();
33 st.executeUpdate(table);
34 return true;
35 }
36
37 public ResultSet getStatement(String query)
38 throws SQLException
39 {
40 Statement st = con.createStatement();
41 ResultSet rSet = st.executeQuery(query);
42 return rSet;
43 }
44
45}