freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- 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 09:41:31 -0600
Thanks Bill :) Here is the info you wanted:
a) I am using the tds API - I needed speed so I went for the lowest layer
b) At the very end I am getting data into an STL string but for the conversion I am using the SYBCHAR type.
c) I'd prefer it "de-unicoded" but I can always do the lifting if need be
Thanks
chad
Thompson, Bill D (London) wrote:
Chad,
when you get past this point, you will probably hit problems with the data
conversion logic.
This is all a bit flaky at the moment, as I hinted earlier.
To help me better understand how to make it more robust, could you tell me :
a) which API are you using (dblib, ctlib etc.)
b) Into what type of host variable are you wanting to retrieve the data
(DBCHAR, etc) i.e what have you bound the column to ?
c) are you expecting this data to be "de-unicoded" or do you want it as is ?
thanks,
Bill
-----Original Message-----
From: Chad Enney [SMTP:Chad.Enney AT noaa.gov]
Sent: Thursday, August 29, 2002 4:01 PM
To: TDS Development Group
Subject: [freetds] RE: MS SQLServer 2000 and "for xml auto" command
Brian gets the prize!
Every other byte is a null! Which in turn throws off the normal print out of the value. If I iterate through the buffer I get a result like:
Value: <
Value:
Value: t
Value:
Value: d
Value:
Value: s
Value:
Value: _
Value:
Value: t
Value:
Value: e
Value:
Value: s
Value:
Value: t
...
I'll try to run down where the unicode to ascii conversion happens and see if I can pin point it.
Thanks again,
chad
Brian Bruns wrote:
Chad,be
Just a thought, it may not turn up anything but....
in the unittest can you have it print buf[0], buf[1] etc... up to say 10
or so? I'm wondering if something is going on with the unicode to ascii
conversion and the second byte (buf[1]) is a null and thus appearing to
cut off when handling via C.know.
Brian
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
snapshot?Thanks
chad
Lowden, James K wrote:
From: Chad Enney [mailto:Chad.Enney AT noaa.gov]Chad,
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.
Thanks for the PR; xml stuff is new turf.
What version of FreeTDS are you using, or what's the date of your
$subst('Email.Unsub')-----jkl
You are currently subscribed to freetds as: [Chad.Enney AT noaa.gov]
To unsubscribe, forward this message to
---
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')
-
MS SQLServer 2000 and "for xml auto" command,
Chad Enney, 08/28/2002
- <Possible follow-up(s)>
- RE: MS SQLServer 2000 and "for xml auto" command, Lowden, James K, 08/28/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Chad Enney, 08/28/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Brian Bruns, 08/28/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Thompson, Bill D (London), 08/28/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Chad Enney, 08/28/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Lowden, James K, 08/28/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Chad Enney, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Chad Enney, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Thompson, Bill D (London), 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Chad Enney, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Brian Bruns, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, ZIGLIO Frediano, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Brian Bruns, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Brian Bruns, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, ZIGLIO Frediano, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Brian Bruns, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Frediano Ziglio, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Chad Enney, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Lowden, James K, 08/29/2002
- RE: MS SQLServer 2000 and "for xml auto" command, Brian Bruns, 08/29/2002
Archive powered by MHonArc 2.6.24.