If you are using a SQL SELECT statement and storing the results to a cursor, you may be giving the cursor the same name as one of the tables in your data-environment. For example, if I had a table called "MyTable" in my data-environment and tried to execute this code:
SELECT * FROM MyData INTO CURSOR MyTable
I would get your error.
The cursor name must be unique to the data environment.
-Kevin