Consultor Eletrônico



Kbase P113323: Invalid metadata field error retrieving data from a ProResultSet
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

SYMPTOM(s):

Invalid metadata field error retrieving data from a ProResultSet

Invalid metadata field (at position <field position>). (7184)

TEMP-TABLE being passed as a parameter contains array fields

Schema is retrieved successfully

Exception: Invalid metadata field (at position 5). (7184)
com.progress.open4gl.ProSQLException: Invalid metadata field (at position 5). (7
184)
at com.progress.open4gl.dynamicapi.ResultSet.getProSQLException
at com.progress.open4gl.dynamicapi.ResultSetMetaData.getFieldProType
at DynTTClientMT.run
at java.lang.Thread.run

CAUSE:

getColumn and getField methods are being mixed.

FIX:

Change getColumnCount to getFieldCount when retrieving number of fields, for example:
for (ix = 1; ix <= schema.getFieldCount(); ix++)
{
int colType = schema.getFieldProType(ix);
m_outfile.write("Field type: " + schema.getFieldTypeName(ix) + "\n");
m_outfile.write("Field name: " + schema.getFieldName(ix) + "\n");
}