Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Running a spoc through a cursor

Author  Topic 

nikulina
Starting Member

2 Posts

Posted - 2010-09-22 : 12:25:55
Hi l am using microsoft server (with studio ms studio express as my GUI)


I am using vb to execute a spoc which in turn uses a cursor to run a second sproc.

The sproc works fine untill the cursor size gets too big, around 800 records (which takes about a minute tops). At this point the whole thing fails and the original spoc doesnt commit the transaction and closes the cursor. I dont understand why it is fine upto a certain point. Has anyone any ideas as i am completly stuck on this and cant seem to find anything through existing forums.

Many thanks,


jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-09-22 : 12:48:48
One problem is that you are using vb to execute a sproc which in turn uses a cursor to run a second sproc.

We'd have to see your code to help you further.

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-09-23 : 12:16:45
can i ask the need of this row by row processing by second proc? is this something that you inherited? if not, it would be better to use set based approach rather than calling proc for each and every row.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -