473,657 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1576
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******@integ rity.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2828
by: Roland Mayr - Chipware | last post by:
Hello NG, maybe someone can help me. I would like to delete a txt file which is linked to an MsAccess table. I deleted the linked table but I am still not able to delete the external txt file. Only when I exit MsAccess it seems possible to delete the file. Thanks in advance. Rolly
2
3199
by: LaurenW | last post by:
After many years of working with Access, I am FINALLY required to delete a single field from a table in a linked back-end data base and I must do it fro the FRONT end! There MUST be a way to do this. SQL ALTER TABLE code does not work because the table is linked. I cannot find a "Delete field" method in DAO. I hope I'm overlooking it. Any advice will be appreciated.
9
7323
by: ProgrammerGal | last post by:
I am hoping this is a quick easy question for someone! :) I am trying (struggling) with moving data from Sql Server to a Lotus Notes table. I am using SQL Server 2000, I have a Lotus Notes linked server (using NotesSQL), and I wasnt to clear the table (delete all records) and then reload it from my data on SQL Server. What is the syntax to delete the records?
5
9922
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 server), it executes immediately. Similarly, if I run the same SQL command through an ODBC linked...
17
2055
by: (PeteCresswell) | last post by:
I've got apps where you *really* wouldn't want to delete certain items by accident, but the users just have to have a "Delete" button. My current strategies: Plan A: ------------------------------------------------------------------------ 1) Make the cmd button black and do not give it an accelerator key. 2) Issue two levels of confirmation (Do you want to delete... Do you REALLY want
3
2544
by: Jeff | last post by:
In a subform I have a simple SQL statement that links an order details table to a product table. The form is used to enter order details. Most fields are obviously from the details table, with only a UOM field from the product table. This has worked fine for years, I thought. The problem I seem to have is that if the user makes a mistake in putting a product in the order they then naturally want to delete the line out of the order....
2
2886
by: Hph | last post by:
I have a repeating problem that I have been able to fix in the past only one way. I get a record that turns from 'english' to "foreign symbols" and then I cannot edit or delete that record. The way I have gotten around it before is to make a copy of the table (structure only) and then copy and pasted the good records into it. Then I was able to delete the bad table and move on. This is time consuming but does work until some months...
6
4085
by: scott.tang | last post by:
I'm experiencing a very strange problem. My application is MS Access front-end and MS SQL server back-end database. I have a SQL statement that deletes records from a table after an export process. The problem is occasionally when the delete statement is executed, these records no longer display on List Box (not even in the MS Access link table). But when close and reopen the form, those records reappear. It almost like MS SQL server...
0
8303
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.