XML Problems

Michael Kleehammer <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAEeFzG_0yD8MnCGWGcpqh_uw6KzNLWk9jj2qSHSB=109p+Fdpg@mail.gmail.com>
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.

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?

Thanks,
Michael Kleehammer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.