Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQL_SUCCESS_WITH[out]_INFO in ODBC lib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Nathan Bird <nathan AT acceleration.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQL_SUCCESS_WITH[out]_INFO in ODBC lib
  • Date: Tue, 29 Apr 2008 10:39:41 -0400

ZIGLIO, Frediano, VF-IT wrote:
Nathan Bird wrote:
Reading data in chunks with SQLGetData if the buffer is not
long enough
for the value to copy, it should fill the buffer, and return SQL_SUCCESS_WITH_INFO, along with setting the
StrLen_or_IndPtr to point
at the how much data is available. At least according to http://msdn2.microsoft.com/en-us/library//ms715441.aspx [1]
the info
should be "01004" to indicate the string is right
- /* not all readed ?? */
- if (colinfo->column_text_sqlgetdatapos <
colinfo->column_cur_size)
- /* TODO add diagnostic */
+
+ if (colinfo->column_text_sqlgetdatapos <
colinfo->column_cur_size) { /* not all read ?? */
+ odbc_errs_add(&stmt->errs, "1004",
"String data, right truncated");
ODBC_RETURN(stmt,
SQL_SUCCESS_WITH_INFO);
+ }

IMO is correct!
2 is ok, even odbc refer as remaining bytes.
I would merge part 3 in 0.82 and 2 and 3 in CVS HEAD.

bye
freddy77

I've been wanting to test this before responding again, but haven't gotten a chance--nor am I likely to soon. So real quick: Shouldn't that string be "01004" instead of "1004"? That's what the code on my end is expecting and what http://msdn2.microsoft.com/en-us/library//ms715441.aspx says...

Thanks
Nathan




Archive powered by MHonArc 2.6.24.

Top of Page