change sql client logic