That worked!! I thought I'd specified client-side cursor before, but I guess it was "user error"

Thanks very much for your help, this one was stupid and it was bugging me!!