question

Farah A avatar image
0 Likes"
Farah A asked Farah A answered

Export new added row from global table to SQL database

Greeting everyone,

I have built a model in which I add rows and columns in a global table using process flow.

I want to export the added row simultaneously in my sql table, this means each time a row is added in my global table, it should be added at the same time in my database.

My question is how can i automatically export the data without having to do it manually from DBconnector ? what trigger is needed ?

i have basic knowledge in sql, which query can help me do that ?

Thank you for your help folks

sql queriesexport datadatabase connector
· 8
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Farah A avatar image
0 Likes"
Farah A answered

Thanks @Benjamin W2 for your consideration,this code worked well for me to write in MysqlDatabase :

Database.Connection con = Database.Connection("DBConnector1");

con.connect();

Database.PreparedStatement statement = con.prepareStatement("INSERT INTO Table1 (id) VALUES (:id )");

statement.bindParam("id", Table("Date DG")[Table("Date DG").numRows][1], Database.DataType.Int);

statement.execute();

con.disconnect();

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.