Skip to Content.
Sympa Menu

freetds - RE: MS SQLServer 2000 and "for xml auto" command

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Chad Enney" <Chad.Enney AT noaa.gov>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: RE: MS SQLServer 2000 and "for xml auto" command
  • Date: Thu, 29 Aug 2002 08:45:53 -0600


The colsize does indeed sound look reasonable - but let me look into this a little bit. My first task this morning in to look at the buffer memory in a debugger to see if Brian was right and I have null that is artificially terminating my string.

Thanks again for all the help!
chad

Lowden, James K wrote:

From: Chad Enney [mailto:Chad.Enney AT noaa.gov]
Sent: August 28, 2002 5:35 PM

It is a C++ program utilizing the tds layer directly. I am indeed calling the tds_convert function but the tds->res_info->columns->column_textvalue
member seems to only have the first character in it before the convert call. So I focused on trying to find the issue in read.c.


Chad,
In token.c line 976, have you determined that colsize is reasonable? After
the call to tds_get_n, does curcol->column_textvalue point to a valid
buffer? If it does, line 993 looks bogus:

if (curcol->column_unicodedata) {
curcol->cur_row_size = strlen(dest);
} else {
curcol->cur_row_size = colsize;
}
Unicode data for ascii characters will have a null in every other byte. The
strlen() looks wrong, and it would return 1 for unicode data on a little
endian machine.
HTH.

--jkl


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.



---
You are currently subscribed to freetds as: [Chad.Enney AT noaa.gov]
To unsubscribe, forward this message to $subst('Email.Unsub')







Archive powered by MHonArc 2.6.24.

Top of Page