SQL statement example 2
This is an example of inserting data in the Database outbound protocol.
In this example, the Database Outbound protocol thread inserts a record into
the Table_sanity
table. The placeholder table.columnName represents the column value that is parsed
from the outbound Cloverleaf message.
Action: insert into Table_sanity( ID, strFLD, intFLD, dateFLD, flag) values(Table_sanity.ID, Table_sanity.strFLD, Table_sanity.intFLD, Table_sanity.dateFLD, Table_sanity.flag )
Running this example in Testing Tool results in:
Command Issued: hcidbprotocoltest -e ASCII -r -f nl write C:/cloverleaf/cisversion/
integrator/t-dbp.sanity/test/test.txt
Command output:
outbound db thread
Test with MESSAGE 1
key01,test1,1,10/01/12,0
Running DB Write action succeeded.
Executed SQL:
insert into Table_sanity( ID, strFLD, intFLD, dateFLD, flag ) values( key01, test1, 1, 10/01/12, 0 )
Returned results:
> update count: 1