473,385 Members | 1,912 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,385 software developers and data experts.

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 3679

"Beto" <Be**@discussions.microsoft.comwrote in message
news:45**********************************@microsof t.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**@discussions.microsoft.comwrote in message
news:45**********************************@microsof t.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
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...
10
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...
3
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...
2
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. ...
5
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...
6
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...
2
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...
46
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...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.