[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

erasing records

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
Remisglez
Asked:
Remisglez
1 Solution
 
kretzschmarCommented:
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
 
iman_a_rCommented:
What is the error.Write it completely.
Maybe it isnt because of relation.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now