Monday, March 26, 2012
Error 16916: A cursor with the name "tentative_cursor" does not exist
I am creating a stored procedure which contains the declaration of a cursor, fetch the cursor, close the cursor, deallocate cursor. I tried executing this code in SQL analyzer and found working. But when I use the same code inside a create stored procedure, it throws the following error message.
Error 16916: A cursor with the name "tentative_cursor" does not exist
As a result, I am not able to proceed in creation of stored procedure with the above SQL statements.
Can any one help me where the problem is..
My SQL statements..
---
DECLARE tentative_cursor CURSOR
FOR select * from TbTentativeBookingTable where ExpTime < GETDATE()
GO
OPEN tentative_cursor
GO
DECLARE @.transactionno BIGINT
...
...
FETCH ...
CLOSE tentative_cursor
---
Thanks
-SudhakarThe GO keyword serves to terminate a SQL batch, so it implicitly ends a stored procedure declaration. There may be other problems too, but at the very least you need to remove the GO keyword(s).
-PatP
Sunday, February 19, 2012
Error - Attempted to read or write protected memory
Hi,
I am back with one more problem..
I have created few reports using SSRS 2005. I am using Oracle database in Data Source to fetch my data. It is working fine and showing me report correctly. But after running the report 8 to 10 times, it starts giving me Memory error. To get rid of that, I need to recycle (stop-start) ReportingService from IIS.
I am exactly getting following error...
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I am not getting the actual problem, why is it giving memory error only after running few times? Please let me know if anyone facing same problem or knowing the solution for the problem.
Thanks,
HMaheta
Dear HMaheta,
Check the DTC (Distributed Transaction Coordinator) service. It should be set up to to start automatically.
HTH,
Suprotim Agarwal
|||
Hi Suprotim,
Thanks for your reply.
I checked for the DTC. It is running on the server and also marked for auto start up.
Is there any other thing, which I am missing?
Thanks,
HMaheta