I currently created a Trigger on a table. when a record is inserted onto the table, what the trigger does is, read all the fields from that record and insert them onto a new table called tblTempMail. the trigger then selects everthing from tblTempMail and sends it out to my email address.
The problem that i'm getting is the format. Whenever data is being inserted onto tblTempMail, the sequence for which the fields are being inserted are lost, so whenever the trigger retrieves the record from the tblTempMail table and sends it out to an email, the format that i want is lost.
I think the problem lies when records are being inserted onto tblTempMail, instead of following the sequence of "Insert ..." (actual sequence of codes inside the Trigger) the format depends on how long (processing time) to insert the record. For ex, if statement "Insert tblTempMail values (Mail Address)" takes longer than "Insert tblTempMail values (Comment)" to process, Insert comment might be inserted first, instead of Insert Mail Address.
I was thinking, maybe i could somehow tell the system to "Pause" for X milliseconds for doinng another insert, is that possible? or is there a code format that i should follow?
Thanks for any suggestion
The problem that i'm getting is the format. Whenever data is being inserted onto tblTempMail, the sequence for which the fields are being inserted are lost, so whenever the trigger retrieves the record from the tblTempMail table and sends it out to an email, the format that i want is lost.
I think the problem lies when records are being inserted onto tblTempMail, instead of following the sequence of "Insert ..." (actual sequence of codes inside the Trigger) the format depends on how long (processing time) to insert the record. For ex, if statement "Insert tblTempMail values (Mail Address)" takes longer than "Insert tblTempMail values (Comment)" to process, Insert comment might be inserted first, instead of Insert Mail Address.
I was thinking, maybe i could somehow tell the system to "Pause" for X milliseconds for doinng another insert, is that possible? or is there a code format that i should follow?
Thanks for any suggestion