Reload metadata on itgensql160 (or even earlier when itgensql160 will otherwise occur)

The behaviour of the SQL engine might be adapted to avoid an itgensql160 error, such as reloading the metadata and re-running the query when it would otherwise have been triggered.

An error can occur:

itgensql160
Row length 127 doesn’t equal the field count 64 on row #0. Type ‘FirehoseResultSet’.

when running a query such as:

select *
from   table@datacontainer
limit 100

It can occur when the metadata of the table has changed between logging on to the database, first use and later use retrieving or uploading data. For instance, when you drop the table on Oracle and re-create it with columns different in type, name or number of, the itgensql160 error should occur.

Invantive SQL assumes that the metadata is stable for the duration of a session. On some platforms, like Teamleader or AFAS Profit, the metadata will be cached aggressively so it can take even hours for new custom fields or GetConnectors to show up.