Consultor Eletrônico



Kbase P167211: System error 6177 and ODBC error 22005 occur when querying a table that was created using Generate D
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/15/2011
Status: Unverified

SYMPTOM(s):

System error 6177 and ODBC error 22005 occur when querying a table that was created using Generate Delta.SQL utility for DataServer for MS SQL Server

Running the following query causes the error:

FIND <table> WHERE <table>.<field> = <value> NO-LOCK.

SYSTEM ERROR: Assignment error. (6177)


22005: [Data Direct][ODBC SQL Server Driver][SQL Server]Conversion failed when converting the varchar value RGRSNR to data type int.

FACT(s) (Environment):

Using the OpenEdge 10.2B Wire Protocol Driver for MS SQL Server
Using the "Generate delta.sql Progress to MSS" utility to update Progress Schema Holder database and foreign MS SQL database.
Delta .DF utility generates all fields with a QUOTED-NAME entry, e.g.

QUOTED-NAME """CustNum"""
Resulting .DF file is successfully loaded into Schema Holder database
Resulting .SQL file is successfully loaded into foreign MS SQL database
OpenEdge 10.2B
Windows

CAUSE:

Bug# OE00197991

CAUSE:

The Generate Delta SQL utility that generates the delta file should be using information in the schema holder to determine whether or not to use the QUOTED-NAME setting (this is based on what the ODBC driver in use supports). Currently, the delta utility adds QUOTED-NAME regardless. By default, Microsoft's ODBC drivers allow the use of quoted identifier but the DataDirect driver does not.

FIX:

Option #1
Go to ODBC Data Source Administrator, select the ODBC DSN being used and edit it.
Select the Advanced tab then check the box "Enable Quoted Identifiers".
Restart the OpenEdge session and re-test. The query should now work as expected.

Option #2
Edit the delta .df file and remove all QUOTED-NAME entries.
Apply the .df.