get cursor from conn