Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
CPEPhantom
Starting Member
6 Posts |
Posted - 2004-07-26 : 17:16:41
|
I am having problems deteling records in access using event procedures. What I want to do is this; delete the parent records and all the child records associated with it. I have tried using the recordset method xxx.delete but it doesn't work. when I try to use it I get an "invalid arguement" error but cannot find any such thing in my code (it doesn't stop anywhere in the code). I was looking at the help and it mentioned something about indexes not being unique causing a problem but i don't even have indexes as far as I know other than the record #s. any recommendations/help would be appreciated.(why can't .delete work the same as .addnew??? ) |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-07-26 : 19:20:51
|
Do you have foreign key relationships set up between your parent and child tables? If so, you can enforce a cascase delete. But I'm not sure how this works when you do a recordset delete from ADO. Can you post your table design and the code you're using? |
 |
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2004-07-27 : 13:12:44
|
Of course, a totally different approach would be to issue the SQL statements to delete the records. That's the way I like to do things, anyway.-----------------------------------------------------Words of Wisdom from AjarnMark, owner of Infoneering |
 |
|
|
|
|