SP or Trigger rule ??

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

I got two same tables (invoice, invoice_history)
When user insert the record, (i will save a copy in the table
invoice_history)
when user amend the record, (i iwll save the updated record in the table
invoice_history_too)
Now, I am worry that I don't know how to do that by trigger rule.
If is use SP to do, Will it make the system (vb.net) too slow,
I am newbie in trigger rule , and don't know how to design,
Can anyone be kind to give me some idea ? Thanks in advance.
 
Agnes said:
I got two same tables (invoice, invoice_history)
When user insert the record, (i will save a copy in the table
invoice_history)
when user amend the record, (i iwll save the updated record in the table
invoice_history_too)
Now, I am worry that I don't know how to do that by trigger rule.
If is use SP to do, Will it make the system (vb.net) too slow,
I am newbie in trigger rule , and don't know how to design,
Can anyone be kind to give me some idea ? Thanks in advance.

using a sproc will not slow down the system. In most cases a sproc will
speed things up.
 
Well a trigger is verry suitable for this purpose

here is a good article that covers the subject on how to use them in the by
you described situation http://www.developerfusion.co.uk/show/2413/1/

a trigger is not faster or slower as a SP ,, in a mather of fact i was
tought that in fact a trigger is a event driven proc , this is why they are
so handy they can be "triggered" at certain events that occur on your table
( inserting , deleting , modifying data )


regrds

Michel Posseth [MCP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top