Re: XML Problems
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAHt6W4fBCvcVznZ4=5ieVxpEfz58F5-TSWS45ovr6_4EGyKB3g@mail.gmail.com> |
2012/9/30 Michael Kleehammer <[email protected]>: > Either there are two problems with selecting XML, or I am seriously > misunderstanding something. > > I am using protocol version 7.2 > > First, when I select from an xml column, SQLDescribeCol reports the sqltype > as SQL_CHAR instead of the expected SQL_SS_XML. > FreeTDS support XML requesting char data, not in binary format, so the result is SQL_CHAR (well, perhaps should be SQL_LONGVARCHAR). > python 7FFF79F56180 EXIT SQLDescribeCol with return code 0 > (SQL_SUCCESS) > SQLHSTMT 0x7fc35a616080 > SQLUSMALLINT 1 > SQLCHAR * 0x7fff59073a30 > | s | > SQLSMALLINT 300 > SQLSMALLINT * 0x0 > SQLSMALLINT * 0x7fff59073a2e (SQL_CHAR) > SQLULEN * 0x7fff59073a20 (2147483647) > SQLSMALLINT * 0x7fff59073a1e (0) > SQLSMALLINT * 0x7fff59073a1c (SQL_NULLABLE) > > Second, SQLGetData always returns SQL_SUCCESS, even when the buffer is too > small. It NULL terminates at the given buffer length but gives no > indication more should be read. > > Am I missing something? > This seems a bug! Which version are you using? Did you check textsize setting? > Thanks, > Michael Kleehammer Regards, Frediano