Afterinsert - Insert in table in a different database

I have a form that is working great. I need to add some code the the afterinsert event to insert a portion of the information just inserted to a table in a different database. I’m stumped on how to go about this. Can anyone give me some tips or point me in the right direction? Thanks in advance.

You go to the event onAfterInsert / editor and look at the right side at the examples. And yes, you can click the examples … :wink:

First you have to create a new connection with the credentials for the 2nd database. Let’s say conn_db2
Then in onAfterInsert: sc_exec_sql(“INSERT INTO …”,“conn_db2”);

jsb