Solved

erasing records

Posted on 2003-10-24
4
128 Views
Last Modified: 2010-04-05
Hi experts, I need to erase a record from table a Microsoft Acces database (.mdb) but the table have a relation and it is the master, then it give me an error, the relation is made on Microsoft Access and it has the property erase on cascade, how can I erase a record of this table from my aplication?

thanks a lot, Luis
0
Comment
Question by:Remisglez
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 20 total points
ID: 9617289
just use

dataset.delete;  //dataset may a adotable or similar

or wilth a sql-statement with a query object like

delete from TablenameHere where FieldnameHere = YourIdentifierHere

use the ExecSql-method of the query object to perform the statement

the cascade delete rule should delete the childs then -> no further action
otherwise delete the childs first

meikl ;-)
0
 

Expert Comment

by:iman_a_r
ID: 12027865
What is the error.Write it completely.
Maybe it isnt because of relation.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now