Feedback
Did this article resolve your question/issue?

   

Article

The SQL Server ODBC driver returns incorrect results when calling SQLDescribeParam().

Information

 
TitleThe SQL Server ODBC driver returns incorrect results when calling SQLDescribeParam().
URL NameSQLServer-WP-driver-Incorrect-results-from-SQLDescribeParam
Article Number000187437
EnvironmentProduct: Connect/Connect64 for ODBC SQL Server Wire PRotocol driver
Version: 7.1
OS: Linux
Database: SQL Server
Application: All supported applications
Question/Problem Description
The SQL Server ODBC driver returns incorrect results when calling SQLDescribeParam()
Steps to ReproduceTable DDL :
CREATE TABLE table1 (col_one varchar(15), col_two varchar(max))

Prepare following statement :
INSERT into table1(col_one, col_two) values (?,?),(?,?),(?,?)

Call SQLDescribeParam() on all parameters.

Observed result :

Parameter 1 & 2 are correctly described :

PARAMETER 1:-
SQLDescribeParam returned:-
dataType 12
parameterSize 15
decimalDigits 0
nullable 1

PARAMETER 2:-
SQLDescribeParam returned:-
dataType -1
parameterSize 2147483647
decimalDigits 0
nullable 1

Parameter 3 and further are not correctly described :

PARAMETER 3:-
SQLDescribeParam returned:-
dataType 12
parameterSize 999
decimalDigits 0
nullable 2

...
Clarifying Information
The SQL used is of following format :

INSERT into Table(col_one, col_two) values (?,?),(?,?),(?,?)

The parameters between the first brackets are described correctly.
The SQLDescribeParam() functions returns incorrect results for the parameters between the subsequent brackets. These parameters are incorrectly described as VARCHAR(999).
Error Message
Defect NumberDefect 48659
Enhancement Number
Cause
Resolution
Fixed in hot fix 07.16.0299 (B0314, U0208).
Refer to Knowledge Base article  “Connect and Connect64 for ODBC hot fix download and install instructions” for instructions on how to download and install the hot fix.
Workaround
Notes
Last Modified Date11/20/2020 7:22 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.