Skip to Content.
Sympa Menu

freetds - Re: Help Freetds 0.53 - removing messages printed to-- STDERR

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Michael Horowitz" <michael.horowitz AT storagenetworks.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: Help Freetds 0.53 - removing messages printed to-- STDERR
  • Date: Sat, 5 Jan 2002 15:05:16 -0500


Actually, I tried SQL Server 2000 without "emulate-little-endian" and with
that swap removed and the datetime fields are fine and so are the error
messages.
With SQL Server 7.0 with the same setup, the datetime fields are wrong,
and the error messages are messed up.

I tried using the following instead of completely removing the swap:
if (!tds->emul_little_endian) {
tds_swap_bytes(&rc, 4);
}
That fixed the error messages on SQL Server 7.0, but then they were
screwed up on SQL Server 2000.

I don't know enough about the protocol to know what is supposed to happen,
but I hope these tests will help you track down the problem.

--Mike


> From a big endian machine, I have to use "emulate-little-endian" to
> connect to SQL Server 7 and above with either TDS 4.2 or 7.0, or datetime
> fields are wrong because the bytes are backwards. I thought that the
> whole point of "emulate-little-endian" was because SQL Server didn't
> properly swap bytes for big endian machines. I tried using "swap broken
> dates", but that didn't do anything.
>
> I thought that without "emulate-little-endian" a properly working SQL
> Server is supposed to do the swapping of the bytes? Is that only for
> datetime and other data fields, and not for the message number? If that
> is the case, then I guess you should only swap those bytes if
> "emulate-little-endian" is off.
>
> --Mike
>
> > >Hey Mark,
> > >
> > >I was wondering if you looked into any of this stuff in my last email?
> >
> > I haven't looked at it yet, but in the configuration I'm using (TDS
> > 4.2, no emulate-little-endian, SQL Server 7), error codes needed to
> > be swapped or error messages never get reported.
> >
> > I'm planning on taking a look this weekend... just got hung up with
> > some other things at work.
> >
> > --
> > __________________________________________________________________________
> > "They that can give up essential
> > liberty
> > Mark J. Lilback to obtain a little temporary safety
> > <mark AT lilback.com> deserve neither liberty or safety."
> > http://www.lilback.com/ -- Benjamin Franklin




Archive powered by MHonArc 2.6.24.

Top of Page