title: cx_freeze python sqlite3 database doesn't work after build.exe?
body: <p>Basically i have a pyqt application that uses a sqlite3 database, now I used Cx_Freeze to turn it into an executable.</p>
  
  <p>I find that the database and queries run perfectly when they are ran as a .py, but after the cx_freeze conversion to .exe the gui works flawlessly but the database doesn't respond to any queries.</p>
  
  <p>Here is the code for the setup script:</p>
  
  <pre><code>from cx_Freeze import setup, Executable
  
  # Dependencies are automatically detected, but it might need
  # fine tuning.
  buildOptions = dict(packages = [],
      excludes = [],
      includes = ["sip", "PyQt5.QtSql"],
      include_files = ["tpaData.db"])
  
  import sys
  base = 'Win32GUI' if sys.platform=='win32' else None
  
  executables = [Executable('testTpa.py', base=base)]
  
  setup(
      name='Tpa APP',
      version = '0.1',
      description = 'A PyQt TPA Program',
      options = dict(build_exe = buildOptions),
      executables = executables
  )
  </code></pre>
  
  <p>here is the code I use to instantiate the db and app:</p>
  
  <pre><code>def __init__(self, dialog):
          Ui_Form.__init__(self)
          self.setupUi(dialog)
          self.createConnection()
  
  def createConnection(self):
          self.db = QtSql.QSqlDatabase.addDatabase('QSQLITE')
          self.db.setDatabaseName("tpaData.db")
          self.db.open()
          self.query = QtSql.QSqlQuery()
          self.query.exec_("create table doses(dose text, bolus text, discard text, remaining text, time1 text, time2 text, time3 text, comment text)")
  </code></pre>
  
  <p>later in the app i use the query.prepare method to make a string of the inputs and then query.bind method to bind values to the query.prepare string. Finally i use query.exec_() to submit that prepared string.</p>
  
  <p>In the dev environment(.py file) works, just post cx_freeze it fails.</p>
  
  <p>Thanks in advance for the help.</p>