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/ :
---------------------------------------------------------