UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Question Regarding Access/SQL Triggers    
 
   
redline1
post Mar 10 2005, 07:42 PM
Post #1

New Member
Posts: 3



I'm a novice Access user. Currently, I am interested in experimenting with the theory and script underlying triggers. As I peruse the Access help module, it appears Access doesn't contain trigger commands for databases (mdb). It does accept such commands for projects (adp). I think I need SQL server to create such projects (adp), and I do not have the software. In order to familiarize myself with the functionality of triggers, can I practice using Access mdb's? Would that require using basic SQL language? Is there a book(s) or online documentation that one would recommend to learn more about trigger functionality and script as it pertains either to SQL or Access?

Your attention to these questions is sincerely appreciated.

Regards,

John
Go to the top of the page
 
+
fkegley
post Mar 11 2005, 10:27 AM
Post #2

UtterAccess VIP
Posts: 23,583
From: Mississippi



A major use of triggers in SQL is in implementing cascading deletes and cascading updates. A way to practice in Access would be to take a copy of Northwind, change the relationships so that there is no cascading deletes or updates between the tables (keep the relationships though and keep R.I. enforced). Then build a form/subform combination that shows Orders and Order Details. Place a delete button on the form. Attach to the click event of the button code that will delete the records on the many side of the relationship. I would suggest a delete query that takes as its parameter the "one" side key of the record you are deleting. Then build a macro that runs that query. On the click event of the delete button, run the macro.

There are also any number of good SQL books that go into Triggers.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 12:26 PM