By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,997 Members | 1,470 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,997 IT Pros & Developers. It's quick & easy.

SQL Server does not DELETE rows for real

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.