List:MySQL ODBC« Previous MessageNext Message »
From:M.-A. Lemburg Date:March 18 1999 3:54pm
Subject:Problem with BLOBs
View as plain text  
Hi,

I'm having trouble with the way MyODBC treats parameters.
The source says:

/*
** Returns the description of a parameter marker.
** As we can't detect this easily, but MySQL can use strings anywhere
** we simple say that all parameters can be strings.
*/

RETCODE SQL_API SQLDescribeParam(HSTMT hstmt, UWORD ipar, SWORD FAR
*pfSqlType,
                                 UDWORD FAR *pcbColDef, SWORD FAR
*pibScale,
                                 SWORD FAR *pfNullable)

The API always returns SQL_VARCHAR.

This is obviously wrong for binary data, since VARCHAR is
defined as being ascii data only, leading to data truncation
for BLOB data.

Shouldn't this be changed to SQL_VARBINARY or SQL_LONGVARBINARY ?

Cheers,
-- 
Marc-Andre Lemburg                               Y2000: 288 days left
---------------------------------------------------------------------
          : Python Pages >>> http://starship.skyport.net/~lemburg/  :
           ---------------------------------------------------------

Thread
Problem with BLOBsM.-A. Lemburg18 Mar
  • Problem with BLOBsMichael Widenius18 Mar
  • Re: Problem with BLOBsM.-A. Lemburg19 Mar