Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INVALID CURSOR STATE

Status
Not open for further replies.

manuela

Technical User
Jun 11, 2001
18
GB
A stored procedure that was previously working under Win 95 / Crystal Reports 7 is now not working under Windows 2000 Professional with Crystal Reports 8.5!
The error message "ODBC SQL Server Driver - Invalid Cursor State" appears when I try to run the reports using this particular stored procedure.
My other stored procedures still work. The main difference between the working and non-working procedures is that the latter does not use an explicit cursor and contains a series of IF statements. The procedure that still works uses a temp table and an explicit cursor.
If I try to create a new report using the non-working procedure, it retrieves the data on the first refresh but comes up with the invalid cursor state error message on the next refresh.
Would appreciate comments.
Many thanks
Manuela
 
Hi

This may not me much of help anyway give a try.

In your SP use SET NOCOUNT ON on the very first line after the create statement.

In Crystal reports(CRP) 7 you cannot return multiple results
Inside SP u couldnt do this
select * from table1
select * from table2
...



I dont know how this works in CRP 8.5

Some Tips:
1)Try to run the SP directly from the server and see the results, is it multiple result set.... or any errors?
2)Use sqltrace for sql7 or profiler for sql2k and see the
execution of query.
3)check the cursor logic, creation,destory,...
4)Search crystal report support website, they have a nice collection of KB,

dbtech
 
Hi dbtech
many thanks 4 your help
 
Manuela,

Did you resolve this issue of the "Invalid Cursor State" error message with your stored procedure?

I'm having the same issue.

Thanks,
kpd3476
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top