[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

erasing records

Posted on 2003-10-24
4
Medium Priority
?
136 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
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 80 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

830 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