Bug #9784 | MyODBC-3.51.11-2 SQLDescribeParam | ||
---|---|---|---|
Submitted: | 9 Apr 2005 15:07 | Modified: | 29 Sep 2008 16:32 |
Reporter: | Anurag Chakravarti | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | MyODBC-3.51.11-2.i586.rpm | OS: | Linux (suse) |
Assigned to: | CPU Architecture: | Any |
[9 Apr 2005 15:07]
Anurag Chakravarti
[9 Apr 2005 17:07]
Jorge del Conde
SQLCHAR Statement[100]; SQLSMALLINT NumParams, i, DataType, DecimalDigits, Nullable; SQLUINTEGER ParamSize; SQLHSTMT hstmt; GetSQLStatement(Statement); SQLPrepare(hstmt, Statement, SQL_NTS); SQLNumParams(hstmt, &NumParams); if (NumParams) { SQLPOINTER * PtrArray = (SQLPOINTER *) malloc(NumParams * sizeof(SQLPOINTER)); SQLINTEGER * BufferLenArray = (SQLINTEGER *) malloc(NumParams * sizeof(SQLINTEGER)); SQLINTEGER * LenOrIndArray = (SQLINTEGER *) malloc(NumParams * sizeof(SQLINTEGER)); for (i = 0; i < NumParams; i++) { SQLDescribeParam(hstmt, i + 1, &DataType, &ParamSize, &DecimalDigits, &Nullable); AllocParamBuffer(DataType, ParamSize, &PtrArray[i], &BufferLenArray[i]); SQLBindParameter(hstmt, i + 1, SQL_PARAM_INPUT, SQL_C_CHAR, DataType, ParamSize, DecimalDigits, PtrArray[i], BufferLenArray[i], &LenOrIndArray[i]); GetParamValue(PtrArray[i], BufferLenArray[i], &LenOrIndArray[i]); } } SQLExecute(hstmt); for (i = 0; i < NumParams; i++) free(PtrArray[i]); free(PtrArray); free(BufferLenArray); free(LenOrIndArray);
[19 Sep 2006 19:05]
Bogdan Degtyariov
SQLDescribeParam always returns SQL_VARCHAR. This behavior is related to the structure of MyODBC 3.51. It is not planned to make updates in SQLDescribeParam() function. However, MyODBC 5 has this function fully implemented
[29 Oct 2006 4:31]
MC Brown
No changelog entry required.
[29 Sep 2008 16:32]
Andrii Nikitin
according to bug 35957 Connectors 5.1 do not have this feature implemented also