The issue started this week.
Here is my code (IBSpayrollconnector_periodsload)
static public void Main(Args _args,str _sql)
{
IBSpayrollconnector_periodsload payroll = new IBSpayrollconnector_periodsload();
LoginProperty loginProperty;
OdbcConnection odbcConnection;
Statement statement;
ResultSet resultSet;
str sqlstatement, criteria, pmonth="" , pyear="";
SqlStatementExecutePermission perm;
IBSpayrollperiod _pwrkflw;
;
// Set the information on the ODBC.
loginProperty = new LoginProperty();
loginProperty.setDSN("Pay");
loginProperty.setDatabase("dbname");
//info("periods");
//Create a connection to external database.
odbcConnection = new OdbcConnection(loginProperty);
sqlstatement = _sql;
if (odbcConnection)
{
//Assert permission for executing the sql string.
perm = new SqlStatementExecutePermission(sqlstatement);
perm.assert();
//Prepare the sql statement.
statement = odbcConnection.createStatement();
resultSet = statement.executeQuery(sqlstatement);
ttsBegin;
delete_from _pwrkflw where _pwrkflw.IBSpayrollWorkflowState == 0;
ttsCommit;
//Cause the sql statement to run,
//then loop through each row in the result.
while (resultSet.next())
{
//It is not possible to get field 3 and then 1.
//Always get fields in numerical order, such as 1 then 2 the 3 etc.
ttsBegin;
_pwrkflw.Pyear =resultSet.getString(1) ;
_pwrkflw.Pmonth = resultSet.getString(2);
_pwrkflw.insert();
ttsCommit;
// info ("completed succesfully");
}
//Close the connection.
resultSet.close();
statement.close();
}
else
{
error("Failed to log on to the database through ODBC.");
}