473,714 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2547
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******@hotma il.com> schreef in bericht
news:11******** **************@ u72g2000cwu.goo glegroups.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2747
by: Crazy Cat | last post by:
Hi, I wrote the following in the SQL Server 2005 Express Management Studio Query Analyzer and hit execute. Even though Query Analyzer indicated success when I hit refresh on the stored procedure folder the procedure does not show up in the stored procedure list. When I entered 'exec Test' I get an error indicating that SQL Server 2005 can't find the procedure. I executed the following code 'select * from sys.all_objects where name like...
2
2877
by: Crazy Cat | last post by:
Using Visual Basic .NET and SQL Server 2005 I attempt to add a query that is a call to a stored procedure in the DataSet Designer. The TableAdapter Query Configuration wizard finds my stored procedure fine but generates the following error when I attempt to add the query Invalid object name '#temp'.
7
9710
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason for this being to stop the user thinking the application has frozen when in fact it is just waiting for a long SP to complete. Another reason for doing it like this is that I also have had a problem in the past where the SP takes longer than the...
1
16688
by: rover | last post by:
Hi We have an application that runs fine on SQL 2000. Due to other applications we are forced to move to SQL 2005. One Stored Procedure isn't working on the new SQL 2005. It's a SP with output parameters and a recordset. It's working fine on SQL 2000. The data is returned through OLEDB to a VB6 application. In this application the output parameters are working fine (can access them). But the recordset isn't working. Both EOF en BOF are...
10
2939
by: J. S. EDV | last post by:
Hello, I have got a little problem with stored procedures and C#. I have got a stored procedure which should only insert something in a table. For example: ALTER PROCEDURE DBO.PROC1 AS insert into dbo.Test values ('test')
4
5161
by: =?Utf-8?B?Unlhbg==?= | last post by:
1. How do i create a stored procedure in VB.Net and then execute it in VB.Net? 2. How do I modify a table property in VB.Net?
8
14401
by: roundcrisis | last post by:
Hi all: I m trying to get the return value of a stored procedure with .... DbCommand command = connection.CreateCommand(); command.CommandText = "Exec some_SP"; command.CommandType = CommandType.StoredProcedure; int temp = command.Parameters.Add(new OdbcParameter("@ReturnValue",
12
5137
by: Dooza | last post by:
I have a stored procedure that takes a number of inputs, does a bulk insert, and then outputs a recordset. When I run the stored procedure in Server Management Studio I also get a return value from the stored procedure which is an INT. I want to access this return value on my ASP/VBScript page, but do not know how to access it. Here is my code so far:
6
12747
by: BobLewiston | last post by:
I saved a few stored procedures in SQL Server Management Studio. The default Save location, which I accepted, was C:\Documents and Settings\BobLewiston\My Documents\SQL Server Management Studio\Projects. (And yes, each stored procedure was in the form of an .sql file, and I assigned each file name root to be the same as the contained procedure's name.) But this Projects folder must be the wrong place, because my apps aren't finding these stored...
0
8802
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8711
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4464
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4726
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3158
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.