Consultor Eletrônico



Kbase P111928: Invalid use of parameter markers when running a query against UDB/400 through DataServer for ODBC
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/12/2005
Status: Unverified

FACT(s) (Environment):

ODBC DataServer
OpenEdge 10.0B

SYMPTOM(s):

Invalid use of parameter markers when running a query against UDB/400 through DataServer for ODBC

Data Direct 5.1 DB2 Wire Protocol driver v.5.10.00.24

DB2 driver is an external installation of Data Direct ODBC Connect Suite 5.1

A query contains FOR EACH loop or FIND statement with WHERE clause

[DataDirect][ODBC DB2 Wire Protocol driver]Invalid descriptor index.

[DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]STRING TO BE PREPARED CONTAINS INVALID USE OF PARAMETER MARKERS

There are no problems when the same query is run without a WHERE clause

CAUSE:

At the time of this writing (Dec 2005), external DB2 driver installation is not supported. It doesn't set appropriate flags in the schema holder system table _Db. These flags are used to invoke correct subroutines depending on the foreign database type.

FIX:

Use the driver embedded in OpenEdge 10.0B DataServer for ODBC license (v.5.00.00.102)
For test purposes it is possible to set the flags manually to workaround the issue. The following query can be used:
FIND FIRST _Db where _Db._Db-type = "ODBC".
UPDATE _Db._Db-Misc2[4] FORMAT "x(50)".
The _Db-Misc[4] field should be set to "3,7,13,14,16,17,23,26,29," (comma at the end is intentional).