?
Solved

erasing records

Posted on 2003-10-24
4
Medium Priority
?
133 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 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