469,268 Members | 1,019 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

Accidental delete in linked table

jkw
Hi - I created a linked table via ODBC to a SQL Server database. The
table in SQL Server contained over 12,000,000 records. Later, I
started a "Delete" query. When I realized that I was deleting from the
SQL Server, I panicked and tried to stop the query. Esc didn't work,
so I killed Access with Ctrl-Alt-Del (task manager). Is there any way
to know if the query managed to delete any records in the SQL Server
database? I had not yet seen the "You are about to delete "x" records,
are you sure..." prompt. Can anyone advise? I need to decide if I
have to get the SQL Server database restored to the day before this
happened and then run all the data loads from that point until now.

Thanks!

Mar 15 '06 #1
2 1399
Hi

If you know how many records were there before the delete then do a
SELECT COUNT(*) an that db and see if there is a difference.

Mar 15 '06 #2
On 14 Mar 2006 23:33:20 -0800, "jkw" <jk******@integrity.com> wrote:

The sql statement:
select count(*) from MyTable
will give you the number of rows in the table.

I think you're safe. If you normally see that prompt, no records have
been deleted yet. Access uses a transaction for such operations, and
the prompt essentially askes for CommitTrans or Rollback. If you
killed Access before that, no records have been deleted.

You could try this on a *test* table.
What are you running such queries against the production database
anyway? Do you like playing with your job? This is why developers work
on test databases! Go fix that TODAY.

-Tom.

Hi - I created a linked table via ODBC to a SQL Server database. The
table in SQL Server contained over 12,000,000 records. Later, I
started a "Delete" query. When I realized that I was deleting from the
SQL Server, I panicked and tried to stop the query. Esc didn't work,
so I killed Access with Ctrl-Alt-Del (task manager). Is there any way
to know if the query managed to delete any records in the SQL Server
database? I had not yet seen the "You are about to delete "x" records,
are you sure..." prompt. Can anyone advise? I need to decide if I
have to get the SQL Server database restored to the day before this
happened and then run all the data loads from that point until now.

Thanks!


Mar 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Roland Mayr - Chipware | last post: by
9 posts views Thread by ProgrammerGal | last post: by
17 posts views Thread by (PeteCresswell) | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.