Consultor Eletrônico



Kbase 19994: Error 6227 Running Query Against SQL Server 7
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/1/2002
SUMMARY:

This solutions applies to ODBC DataServer or MS SQL Server DataServer.

When you run a query against a table or a SQL statement using the Progress DataServer SEND-SQL-STATEMENT feature or when you try to pull table definitions from a MS SQL Server database into the schema holder, you might get the error :

SYSTEM ERROR: _type_sqlc: Bad datatype <number>. (6227)

It means that the data type of the field is not one that Progress recognizes.

EXPLANATION:

The DataServer ODBC / MS SQL Server does not support the Unicode data types (column that has the 'N' type data type (nchar, nvarchar, ntext)). These data types are returned from the ODBC driver as -8, -9, and -10, respectively. This is why one of these numbers is on the error message.

For example, the following code generates the error 6227 because the column CustomerID is defined as NCHAR:

DEF VAR x AS INTEGER NO-UNDO.
RUN STORED-PROC send-sql-statement x = PROC-HANDLE
('select CustomerID from Customers').

Prior to 9.1B you would get the error when you were pulling the table from SQL Server.
9.1B does not cause the error anymore when loading the table definitions, however as we do not support the 'N' type data types, a code against tables with those data types are going to cause the same error.

Reference to Written Documentation:

Release Notes 091C-00210, "No Support for MSS SQL Server Unicode data types"