diff --git a/Order Processor/.classpath b/Order Processor/.classpath index 60d0773..ab8e8ce 100644 --- a/Order Processor/.classpath +++ b/Order Processor/.classpath @@ -5,7 +5,7 @@ - + diff --git a/Order Processor/lib/mysql-connector-java-5.1.14-bin.jar b/Order Processor/lib/mysql-connector-java-5.1.14-bin.jar new file mode 100644 index 0000000..7ba8ee8 Binary files /dev/null and b/Order Processor/lib/mysql-connector-java-5.1.14-bin.jar differ diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/DB/OrderDB.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/DB/OrderDB.java index ba4cee3..2801025 100644 --- a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/DB/OrderDB.java +++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/DB/OrderDB.java @@ -37,14 +37,12 @@ import com.TwentyCodes.java.OrderProcessor.ProgressListener; */ public class OrderDB { - private final String CREATE_TABLE = "CREATE TABLE Orders " + - "(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT," + - " 'item' blob);"; +// private final String CREATE_TABLE = "CREATE TABLE Orders (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'item' blob);"; private final String INSERT = "insert into Orders (item) values (?);"; private ProgressListener mListener; private PreparedStatement prep; - private String dbLocation; +// private String dbLocation; private boolean isLoadingFile = false; /** @@ -55,18 +53,19 @@ public class OrderDB { * @throws Exception */ public OrderDB() throws ClassNotFoundException, SQLException { - dbLocation = System.getProperty("user.home") +"/.TwentyCodesOrders"; - Class.forName("org.sqlite.JDBC"); +// dbLocation = System.getProperty("user.home") +"/.TwentyCodesOrders"; +// Class.forName("org.sqlite.JDBC"); + Class.forName("com.mysql.jdbc.Driver"); Connection conn = getConnection(); - Statement stat = conn.createStatement(); +// Statement stat = conn.createStatement(); // stat.executeUpdate("drop table if exists Orders;"); - try { - stat.executeUpdate(CREATE_TABLE); - } catch (SQLException e) { - //most likely the table already exist - e.printStackTrace(); - } +// try { +// stat.executeUpdate(CREATE_TABLE); +// } catch (SQLException e) { +// //most likely the table already exist +// e.printStackTrace(); +// } conn.close(); } @@ -149,7 +148,8 @@ public class OrderDB { * @author ricky barrette */ private Connection getConnection() throws SQLException{ - return DriverManager.getConnection("jdbc:sqlite:"+ dbLocation+".db"); +// return DriverManager.getConnection("jdbc:sqlite:"+ dbLocation+".db"); + return DriverManager.getConnection("jdbc:mysql://tcdevsvn1/Orders"); } /** diff --git a/Order Processor/version infomation/changelog b/Order Processor/version infomation/changelog index 5e0b45b..ee717a7 100644 --- a/Order Processor/version infomation/changelog +++ b/Order Processor/version infomation/changelog @@ -8,3 +8,7 @@ created a single window with a tabbed layout for a more fluid experience. added an overwrite file dialog. added the customer country to the order object. updated .CSV export + +1.0.2 + +i replaced the old sqlite driver (for local databases) with the mySQL driver to interface with TCDEVSVN1's order database \ No newline at end of file diff --git a/Order Processor/version infomation/version b/Order Processor/version infomation/version index e29e26a..081d67b 100644 --- a/Order Processor/version infomation/version +++ b/Order Processor/version infomation/version @@ -1 +1 @@ -1.0.0 b 29 \ No newline at end of file +1.0.2 b 30 \ No newline at end of file