Fixed terminate connection sql string