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: Wed, 28 Aug 2002 15:35:18 -0600


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.

I am going to try Brian's suggestion next and see if indeed a null is throwing us off :)

Thanks for all the help folks!
chad


Thompson, Bill D (London) wrote:

Chad,

Nice to know the latest (well nearly) snapshot is holding up otherwise.
BTW, what is your mainline code - A bespoke C program , sqsh, or what ?
If it's a bespoke C program what type of variable are you trying to bind the
resulting data to ?
Jim, I don't think its anything specifically to do with this "for xml auto"
thingy.
my guess is that Chad has fallen foul of some code which is not quite
finished yet in convert.c - tds_convert_ntext() !
I kinda skipped over this in the rewritten convert logic , because I
couldn't figure it out in the time available. Who kind of weirdo uses NTEXT columns anyway ? :-)

I guess I should get it plugged sooner rather than later....
If no-one else feels brave enough to pick this up tonight, send me a mail,
and I'll sort it tomorrow Morning (GMT)

Bill

-----Original Message-----
From: Chad Enney [SMTP:Chad.Enney AT noaa.gov]
Sent: Wednesday, August 28, 2002 9:51 PM
To: TDS Development Group
Subject: [freetds] RE: MS SQLServer 2000 and "for xml auto" command

I am using a snapshot from 8/22 - which, if I may say, is working quite nicely for everything else I am doing.

I have debugged the issue all the way to src/tds/read.c and the tds_get_n function. I can see nothing wrong with the way the code copies out the contents of tds->in_buf to the destination but yet I get just the opening < for the result.

I also thought perhaps I was fetching the results incorrectly so I altered one of the unit tests in src/dblib/unittests (t0013.c) to use my select and it has the same issue.

If I can be of any help in getting this worked out please just let me
know.

Thanks
chad

Lowden, James K wrote:


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

RedHat Linux 7.3 connecting to a MS SQLServer 2000 using TDS protocol 7.0

SELECT * FROM tds_test FOR XML AUTO;

Everything looks fine but I only get back the very first character of the returned result. I have turned on the tdsdump file and can clearly see the entire result being returned on the stack. The type is being returned as a SYBNTEXT - and I can retrieve standard columns of this type just fine.


Chad,
Thanks for the PR; xml stuff is new turf.
What version of FreeTDS are you using, or what's the date of your

snapshot?

--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')





---
You are currently subscribed to freetds as: [thompbil AT exchange.uk.ml.com]
To unsubscribe, forward this message to
$subst('Email.Unsub')



---
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