>>>>> "M" == M -A Lemburg <mal@stripped> writes:
M> I'm having trouble with the way MyODBC treats parameters.
M> The source says:
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> RETCODE SQL_API SQLDescribeParam(HSTMT hstmt, UWORD ipar, SWORD FAR
M> UDWORD FAR *pcbColDef, SWORD FAR
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.
M> Shouldn't this be changed to SQL_VARBINARY or SQL_LONGVARBINARY ?
The problem is that in this case ODBC will require the parameters to
be in hexadecimal format (0xab0102...), which will not work with numbers.
In what kind of applications do you get the above problem?
Can't you tell your application the type of the parameter?
Can you generate the query instead of using parameters ?