Kbase 22031: SQL-92: Catalog Names Are Not Supported
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/05/2002 |
|
SUMMARY:
This Knowledge Base applies to the Progress SQL-92 engine. When trying to get the metadata from within certain ODBC applications, you might see an error like this:
[MERANT][ODBC Progress driver]The qualifier 'PUB' was larger than SQL_MAX_QUALIFIER_LEN from SQLGetInfo(8)
The ODBC trace log file shows:
DIAG [S1090] [MERANT][ODBC PROGRESS driver]The qualifier 'PUB' was larger than SQL_MAX_QUALIFIER_LEN from SQLGetInfo (0). (0)
EXPLANATION:
The use of Catalog Names by certain ODBC applications is not supported. Refer to Appendix A of the "ODBC Driver Guide". Here follows a brief explanation on how to verify in the ODBC trace log file if the Catalog Name is being used.
ODBC has different functions that are being used. In this case the problem lies with the SQLColumns function. SQLColumns returns the list of column names in specified tables.
The format for this function is as follows:
SQLRETURN SQLColumns(
SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
SQLSMALLINT NameLength1,
SQLCHAR * SchemaName,
SQLSMALLINT NameLength2,
SQLCHAR * TableName,
SQLSMALLINT NameLength3,
SQLCHAR * ColumnName,
SQLSMALLINT NameLength4);
As you can see it specifies the CatalogName, the SchemaName, the TableName and the ColumnName.
-- Example of an ODBC trace log file:
ImpAdmin 498-26c ENTER SQLColumnsW
HSTMT 01DE1FF8
WCHAR * 0x01DE1708 [ 3] "P"
SWORD 3
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x01DE1B50 [ 6] "led"
SWORD 6
WCHAR * 0x00000000
SWORD 0
ImpAdmin 498-26c EXIT SQLColumnsW with return code -1 (SQL_ERROR)
HSTMT 01DE1FF8
WCHAR * 0x01DE1708 [ 3] "P"
SWORD 3
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x01DE1B50 [ 6] "led"
SWORD 6
WCHAR * 0x00000000
SWORD 0
DIAG [S1090] [MERANT][ODBC PROGRESS driver]The qualifier 'PUB' was larger than SQL_MAX_QUALIFIER_LEN from SQLGetInfo (0). (0)
Paying close attention you notice that here it is specifying a CatalogName, which results in the error message (length is greater than 0). Instead of using the SchemaName it is using the CatalogName.
SOLUTION:
Contact your ODBC application vendor to find out how to turn off the use of Catalog Names.
References to Written Documentation:
Progress Knowledge Base Solution 20472, "How to Generate an ODBC Trace File"
Progress ODBC Driver Guide