public static int placeOrder(Order incord) 
				throws TableException{
		java.sql.Statement stmt;
		java.sql.ResultSet rs;
		int orderid;

		//extract data from the order object
		Order ord = incord;
		ArrayList<OrderItem> itemlist = ord.getOrderItems();
		OrderItem item;

		try
		{
			String createString = "insert into " + ORDERS_TABLE_NAME 
					  + " (CUSTOMER_ID, ORDER_DATE, ORDER_TOTAL ) VALUES("
					  + ord.getCustomerID() + ", '"  + getDateTime() + "', " 
					  + ord.calcOrderTotal() +  " );";
			stmt = sqlConn.createStatement();

			//generated keys in this case is the order ID, which is an identity in the table
			stmt.executeUpdate(createString, stmt.RETURN_GENERATED_KEYS);
			rs = stmt.getGeneratedKeys();
			rs.next();
			orderid = rs.getInt(1);

			try
			{
				for(int x = 0; x < itemlist.size(); x++)
				{
					item = itemlist.get(x);
					OrderItemsDB.createItems(orderid, item.getProductID(), item.getProductQuant(), item.getProductPrice());
					try
					{
						StockItemsDB.decrementStock(item.getProductID(), item.getProductQuant());
					} //end try
					catch (Exception e)
					{
						System.err.println("Error: " + e);
					} //end catch
				} //end for
			} //end try
			catch (OrderItemsDB.TableException e)
			{
			System.err.println("Error writing order items: " + e);
			} //end catch			
			return orderid;
		} //end try
		catch (java.sql.SQLException e) 
		{
			throw new TableException("Unable to create a new Order in the Database." + "\nDetail: " + e);
		} //end catch
	} //end placeOrder