Fixed bug in SQLHelper
Merge pull request #1019 from olee/1710_branch

Fixed bug in SQLHelper