473,473 Members | 3,363 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

delete record

please help

i was trying to delete a specific record on a table but it still shows
the same record that should be deleted. i dont know how.
Jul 20 '05 #1
3 4878
bh*******@yahoo.com (bher2) wrote in message news:<f3**************************@posting.google. com>...
please help

i was trying to delete a specific record on a table but it still shows
the same record that should be deleted. i dont know how.


How are you deleting it? How are you seeing it? Try something like
this from Query Analyzer:

delete from dbo.MyTable
where MyPrimaryKeyColumn = ...

select *
from dbo.MyTable
where MyPrimaryKeyColumn = ...

Simon
Jul 20 '05 #2
bher2,
There may be several reasons for this. Here are some ideas:
- Do a select before you do the delete. See if that brings up the records
you think it will bring up.
- Try the select, then the delete in SQL Query analyzer. If you are doing
this in an application, you might not be seeing any errors that come up,
like foreign key errors.
- Try grabbing the PK first for the record(s) you want to delete, if there
is one and then delete by PK.
- Try updating the statistics on the table. If they are "broken", your db
might not be finding the record(s) you expect, if any.

Hope that helps,
Best regards,
Chuck Conover
www.TechnicalVideos.net
"bher2" <bh*******@yahoo.com> wrote in message
news:f3**************************@posting.google.c om...
please help

i was trying to delete a specific record on a table but it still shows
the same record that should be deleted. i dont know how.

Jul 20 '05 #3
Also, take a look at triggers on the table. There may be a trigger
defined as "instead of delete", which could prevent actual deletion of
the record and just mark it as deleted.

Chuck Conover wrote:
bher2,
There may be several reasons for this. Here are some ideas:
- Do a select before you do the delete. See if that brings up the records
you think it will bring up.
- Try the select, then the delete in SQL Query analyzer. If you are doing
this in an application, you might not be seeing any errors that come up,
like foreign key errors.
- Try grabbing the PK first for the record(s) you want to delete, if there
is one and then delete by PK.
- Try updating the statistics on the table. If they are "broken", your db
might not be finding the record(s) you expect, if any.

Hope that helps,
Best regards,
Chuck Conover
www.TechnicalVideos.net
"bher2" <bh*******@yahoo.com> wrote in message
news:f3**************************@posting.google.c om...
please help

i was trying to delete a specific record on a table but it still shows
the same record that should be deleted. i dont know how.


Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Someonekicked | last post by:
I have a binary file, and I need to delete a specific number of characters in it. The file contains records, each record has a specific length. So the way I wanna handle deleting is that I will...
9
by: Robert Schneider | last post by:
Hi to all, I don't understand that: I try to delete a record via JDBC. But I always get the error SQL7008 with the error code 3. It seems that this has something to do with journaling, since the...
8
by: Steve | last post by:
I have several pairs of synchronized subforms in an application. I have a Delete button for each pair that uses the following code or similar to delete a record in the second subform: ...
3
by: Uwe Range | last post by:
Hi to all, I am displaying a list of records in a subform which is embedded in a popup main form (in order to ensure that users close the form when leaving it). It seems to be impossible to...
3
by: Maria | last post by:
Is there another way to delete the current record in a subform from the main form, another subform or a sub-subform other than setting focus on a field in the subform and using run command...
4
by: Susan Bricker | last post by:
I have a command button on a form that is supposed to Delete the record being displayed. The record is displayed one to a form. The form is not a Pop-Up nor is it Modal. Tracing the btnDelete...
5
by: Bob Bridges | last post by:
Start with two tables, parent records in one and child records in the other, a one-to-many relationship. Create a select statement joining the two. Display the query in datasheet mode. When I...
4
by: Craggy | last post by:
Hi, I am trying to pop up a yes/no message box so that a user can delete a record in a continuous form. The default delete message is a bit sloppy because it seems to move the continuous form to...
5
by: sh26 | last post by:
I can Add and Delete (A, CName, MX and TXT) Dns records on the Dns Server using C# code. The problem I am having is if someone manaully creates a TXT record on the Dns Server, I cannot delete that...
10
beacon
by: beacon | last post by:
Hi everybody, This is probably going to sound unorthodox, but I have to log records that are deleted...I know, go figure. Anyway, I have a form with a (continuous) subform, and on the subform I...
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
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...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
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...
0
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...

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.