SQL Server does not DELETE rows for real

G

Guest

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.
 
M

Mr. Arnold

Beto said:
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?
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top