Solved

erasing records

Posted on 2003-10-24
4
127 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
Comment Utility
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
Comment Utility
What is the error.Write it completely.
Maybe it isnt because of relation.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

14 Experts available now in Live!

Get 1:1 Help Now