469,590 Members | 2,464 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,590 developers. It's quick & easy.

Stored Procedure runs in SQL Server Management Studio but not in VB

I'm calling several SQL Server 2005 stored procedures from Visual Basic
2005. I've got one stored procedure that locks up at the same point
everytime, but if I copy the stored procedure from the SQL Profiler
trace and paste it into SQL Server Management Studio it runs fine -- I
even tried setting the timeout in Visual Studio to unlimited to see if
the procedure would ever complete and it doesn't. What the hell is
going on? Here is the portion of the stored procedure where it appears
to lock up --

insert @temp(MSC_KEY, [Calculated T1s])
select MSC_KEY,
sum([Calculated T1s]) as [Calculated T1s]
from dbo.port_stats
where process_id LIKE @process_id
group by MSC_KEY

@temp is a temporary table, and the table that is being aggregated over
has about 330 rows.
This procedure has worked fine up until today and I can't recall what
changed about it since it ran fine. Please help.

Apr 28 '06 #1
1 2287
Crazy Cat,

If this procedure has forever run until today, than you would have to ask
your DBADMIN in my idea if he has done some changes. The last wonder was
when there a star was falling in Bethlehem.

Cor

"Crazy Cat" <da******@hotmail.com> schreef in bericht
news:11**********************@u72g2000cwu.googlegr oups.com...
I'm calling several SQL Server 2005 stored procedures from Visual Basic
2005. I've got one stored procedure that locks up at the same point
everytime, but if I copy the stored procedure from the SQL Profiler
trace and paste it into SQL Server Management Studio it runs fine -- I
even tried setting the timeout in Visual Studio to unlimited to see if
the procedure would ever complete and it doesn't. What the hell is
going on? Here is the portion of the stored procedure where it appears
to lock up --

insert @temp(MSC_KEY, [Calculated T1s])
select MSC_KEY,
sum([Calculated T1s]) as [Calculated T1s]
from dbo.port_stats
where process_id LIKE @process_id
group by MSC_KEY

@temp is a temporary table, and the table that is being aggregated over
has about 330 rows.
This procedure has worked fine up until today and I can't recall what
changed about it since it ran fine. Please help.

Apr 29 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by J. S. EDV | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.