Deleting data from access database-we need a trigger that also deletes data from other database(sql).

  • If the user deletes one or more records from a table the trigger on deletion shud add a record into the TempTable. The records shud contain all the fields that are part of the a index type id from the table from whihc the user deleted the data. If the table doesnt

    exist, it shud be created by the trigger.

  • Unless 2007 has introduced something I am not aware of - Access doesn't have triggers.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • The triggers mentioned here is for the SQL itself.

    the issue here is how to create a trigger on deletion which should add record into the temporary table which doen not exist should be created by the same trigger.

    All this is in SQL iitself

    I am sorry for using the word access as that will coming in the second part of the task .

    Regards:

  • sarchen21 (5/15/2008)


    The triggers mentioned here is for the SQL itself.

    the issue here is how to create a trigger on deletion which should add record into the temporary table which doen not exist should be created by the same trigger.

    All this is in SQL iitself

    I am sorry for using the word access as that will coming in the second part of the task .

    Regards:

    If you insert something into a temp table within a trigger - the temp table will go out of scope the minute the trigger finishes. So - you'll have nothing (goes out of scope => gets deleted).

    You'll have to use permanent tables for this, and some mechanism to know which ones you just inserted.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply