From: M.-A. Lemburg Date: March 19 1999 11:08am Subject: Re: Problem with BLOBs List-Archive: http://lists.mysql.com/myodbc/65 Message-Id: <36F23048.1F59E73C@lemburg.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Michael Widenius wrote: > > >>>>> "M" == M -A Lemburg 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/ : ---------------------------------------------------------