List:MySQL ODBC« Previous MessageNext Message »
From:M.-A. Lemburg Date:March 19 1999 11:08am
Subject:Re: Problem with BLOBs
View as plain text  
Michael Widenius wrote:
> 
> >>>>> "M" == M -A Lemburg <mal@stripped> writes:
> 
> M> Hi,
> M> I'm having trouble with the way MyODBC treats parameters.
> M> The source says:
> 
> M> /*
> M> ** Returns the description of a parameter marker.
> M> ** As we can't detect this easily, but MySQL can use strings anywhere
> M> ** we simple say that all parameters can be strings.
> M> */
> 
> M> RETCODE SQL_API SQLDescribeParam(HSTMT hstmt, UWORD ipar, SWORD FAR
> M> *pfSqlType,
> M>                                  UDWORD FAR *pcbColDef, SWORD FAR
> M> *pibScale,
> M>                                  SWORD FAR *pfNullable)
> 
> M> The API always returns SQL_VARCHAR.
> 
> M> This is obviously wrong for binary data, since VARCHAR is
> M> defined as being ascii data only, leading to data truncation
> M> for BLOB data.
> 
> Why?  Most well-coded ODBC programs shouldn't have any problems with \0
> character in VARCHAR columns.

I guess I misread the ODBC docs: I expected the VARCHAR type
to not include any \0 characters.

Sorry for bugging and thanks for the reply.

-- 
Marc-Andre Lemburg                               Y2000: 287 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