473,545 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Server does not DELETE rows for real

I am developing a ASP.NET application, with C# code-behind classes; with SQL
Server 2000.

All database access is made through stored procedures.
I can insert, select and update in all tables from C# through stored
procedures.
The problem I am having is with delete operation. When a delete-purposed
stored procedure executes, the row is gone when I do a select on that same
table.
But if I check table contents from SQL Server's Enterprise Manager I can
still see the deleted rows. So far, as far the ASP app goes the rows are
deleted, but they are not for real. Any recommendations ?

Any help will be appreciated.
Thanks in advance.
Sep 4 '07 #1
2 3694

"Beto" <Be**@discussio ns.microsoft.co mwrote in message
news:45******** *************** ***********@mic rosoft.com...
>I am developing a ASP.NET application, with C# code-behind classes; with
SQL
Server 2000.

All database access is made through stored procedures.
I can insert, select and update in all tables from C# through stored
procedures.
The problem I am having is with delete operation. When a delete-purposed
stored procedure executes, the row is gone when I do a select on that same
table.
But if I check table contents from SQL Server's Enterprise Manager I can
still see the deleted rows. So far, as far the ASP app goes the rows are
deleted, but they are not for real. Any recommendations ?

So you're saying that if the record is deleted out of the table and you try
to select the deleted record it not there, by whatever means you're doing
that. But you go to Enterprise Manager and open the table and the deleted
record is still there.

You have gone the the SQL Pane on the opened table in Enterprise Manager and
issued a Select statement for the deleted record and it's there? Or you went
to Query Analyzer and did a Select against on the table for a deleted record
and it's there?

I find it unlikely that a deleted record is there, even if you are seeing it
with Enterprise Manager on an open table view, by whatever means you're
doing this to see the records. Is the table already open and showing the
records in Enterprise Manager while the delete was taking place or is this
after the fact the record was deleted that a record is showing?

Did you try changing a field on the deleted record while in the record pane
of an open table in SQL server? I suspect the if you did that, changed data
on a deleted record, you might find that it's not that and you'll get and
error message from Enterprise Manager.

Are also aware of the Commit statement in a Stored Procedure?

Sep 4 '07 #2
Thanks for your reply. I've figured out what was happening. The problem was
happening because the SELECT stored procedure had some joins. When the joins
didn't match, that row would not be returned as it shuoldn't. I wasn't
realizing that, and obviously there was more data in the raw tables that
would not match the joins in the stored procedure's SELECT.

Thank you again.

"Mr. Arnold" wrote:
>
"Beto" <Be**@discussio ns.microsoft.co mwrote in message
news:45******** *************** ***********@mic rosoft.com...
I am developing a ASP.NET application, with C# code-behind classes; with
SQL
Server 2000.

All database access is made through stored procedures.
I can insert, select and update in all tables from C# through stored
procedures.
The problem I am having is with delete operation. When a delete-purposed
stored procedure executes, the row is gone when I do a select on that same
table.
But if I check table contents from SQL Server's Enterprise Manager I can
still see the deleted rows. So far, as far the ASP app goes the rows are
deleted, but they are not for real. Any recommendations ?


So you're saying that if the record is deleted out of the table and you try
to select the deleted record it not there, by whatever means you're doing
that. But you go to Enterprise Manager and open the table and the deleted
record is still there.

You have gone the the SQL Pane on the opened table in Enterprise Manager and
issued a Select statement for the deleted record and it's there? Or you went
to Query Analyzer and did a Select against on the table for a deleted record
and it's there?

I find it unlikely that a deleted record is there, even if you are seeing it
with Enterprise Manager on an open table view, by whatever means you're
doing this to see the records. Is the table already open and showing the
records in Enterprise Manager while the delete was taking place or is this
after the fact the record was deleted that a record is showing?

Did you try changing a field on the deleted record while in the record pane
of an open table in SQL server? I suspect the if you did that, changed data
on a deleted record, you might find that it's not that and you'll get and
error message from Enterprise Manager.

Are also aware of the Commit statement in a Stored Procedure?

Sep 5 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11785
by: Bob Ganger | last post by:
Hello, I am working on a project using SQL Server 2000 with a database containing about 10 related tables with a lot of columns containing text. The total current size of the database is about 2 Gig. When I delete data from the database, it takes a lot of system resources and monopolizes the database so that all other query requests are...
10
6349
by: HB Kim | last post by:
Hello, What could possibly cause data in the SQL server database to be removed, except being deleted manually? We had a couple of situations where data in certain records disappeared although the records were still there. The data is entered and editted through the web interface in ASP. The web interface is accessed by anyone who has an...
3
3144
by: dusty | last post by:
Hi, I'll try to simplify the problem: I created a table "TestTable" in a database on the SQL server. The first column, 'id', is the primary key with a auto-increment identity. I want to work connection-less, so I made my dataset where I populated a table with the data from the TestTable. When I insert a new row with the .NewRow() method, the...
2
1690
by: Bill | last post by:
Sorry re-posted as my email setting were wrong on the last post I wonder if anyone can help. I have a scheduled job running overnight to delete old records for a particular Db table. The table contains more than half million records and the script
5
9914
by: Neil | last post by:
I am getting time-out errors when I try to perform a simple delete on a linked server. The command is: Delete From MyTable Where PKID=12345 I have tried executing this command directly from Query Analyzer, but it just times out. However, when I run it from QA against the server itself (rather than from my local server against a linked...
6
3842
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called "Generations"), and it allows the user to add, edit and delete the various records of the table. "Generations" table has the following fields: "IDPerson",...
2
6932
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
46
2137
by: RAZZ | last post by:
Hello, Can anyone suggest me solution? I Need to manage different types of documents (doc,xls,ppt etc) in server. I have folder structure to maintain these documents in server. Say folder1 is having all doc files; folder2 is having all xls files and so on. Now these documents should not be able to get access through the url
0
7478
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...
0
7410
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...
0
7923
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...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3466
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...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
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
1
1025
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.