473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Stored Procedure fails to carry out delete.

I have a SS2005 database with a stored procedure that is called from ASP.net. This SP is supposed to read the contents of a row in a table, place the contents into output parameters and then delete that row. When the stored procedure is run from Management Studio. Everything works as designed. However when the stored procedure is called from ASP.Net 2.0, the delete does not occur, and the table becomes very large very quickly. This is not the first time I've seen this. A former co-worker had the same thing occur in ASP.Net 1.1 and SS2K. In Addition I have another stored procedure that outputs the contents of a table as a resultset and then deletes the table that works just fine when called from code. What would cause this Stored Procedure to fail in this manner. Here is the SP:

Create PROCEDURE [dbo].[ut_RetrieveSessions_sp]
(
@Guidval varchar(50),
@UserID varchar(75)out,
@strPW varchar(20) out
)
AS

SET NOCOUNT ON

SET @UserID = (Select UserID From tblJumpToNet WHERE GUID = @Guidval)
SET @strPW = (Select strPW From tblJumpToNet WHERE GUID =@Guidval)
DELETE FROM tblJumpToNet WHERE GUID = @Guidval
SET NOCOUNT OFF

Return
Jan 9 '08 #1
2 1645
And by the way, it does not fail consistently. That stored procedure has been called 50 to 100 times since I last cleared it out but the table had only 25 entries.
Jan 9 '08 #2
ck9663
2,878 Expert 2GB
if you can monitor the times it failed it would be best. if you're sure that it just failed, grab the value of those paramaters and do a test. display the stored proc call from your client side and there could be something on the parameter.

what i usually do is do a response.write thevariable...then do an immediate response.end....then copy the entire displayed string and paste it to management studio...run it...if it did not fail, something else is wrong...

keep us posted...

-- CK
Jan 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: deprins | last post by:
Hello, I have wrote a stored procedure but its real slow. Its activated by a button on web page but its takes to long to process and the web server gives a timeout message after 5 minutes. Is...
11
by: Bã§TãRÐ | last post by:
I have been working on this particular project for a little over 2 weeks now. This product contains between 700-900 stored procedures to handle just about all you can imagine within the product. I...
1
by: Alex | last post by:
Hi all, Just been dabbling with java stored procedures and I'm having problems replacing System: db2 8.1.4 on RH 7.1 linux system 1). Look at java jdbc samples as supplied with db2 and run...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
7
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...
1
by: Jon Haakon Ariansen | last post by:
Hi all, I don't know where to publish this question but hope this newsgroup is okey. I'm working in Visual Studio 2005 and are now creating a dataset file where I will do all the transactions...
6
by: rn5a | last post by:
In a shopping cart app, when a user finalizes his order, records from a temporary table named 'TempCart' get inserted into another table name 'Orders' after which the records from 'TempCart' are...
0
by: jobs | last post by:
I have a gridview that I use to both select a record to be edited in a formview and to also delete records with. Because the selectcommand is grouping rows, my deletes stored procedure requires a...
1
by: eighthman11 | last post by:
Hey everyone, Using Access 2003 and SQL Server 8.0 I have a stored procdure on SQL Server that is launched from my access database where I send the parms. The stored procedure on the server...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.