SQLite Triggers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Dermot
    Indigo Rose Customer
    • Apr 2004
    • 1791

    SQLite Triggers

    Has any oned used triggers with SQLite? I have been trying to get it to work but no luck.

    This is what I have but the trigger never gets created.

    Code:
    SQLite.Query(db, "CREATE TRIGGER InvoiceItemsDelete(AFTER DELETE ON Invoices BEGIN DELETE FROM InvoiceDetails WHERE InvID = Old.InvoiceID END)")
    Dermot
    Dermot

    I am so out of here :yes
  • Dermot
    Indigo Rose Customer
    • Apr 2004
    • 1791

    #2
    Never mind, got it working. The following is what worked.

    Code:
    SQLite.Query(db, "CREATE TRIGGER InvoiceItemsDelete AFTER DELETE ON Invoices BEGIN DELETE FROM InvoiceDetails WHERE InvID = Old.InvoiceID; END")
    Dermot
    Dermot

    I am so out of here :yes

    Comment

    Working...
    X