[freetds] sqsh and msrepl_tran_version
Lowden, James K
LowdenJK at bernstein.com
Mon Jul 7 17:00:55 EDT 2003
> From: Arnar Birgisson [mailto:ArnarB at oddi.is]
> Sent: July 7, 2003 8:42 AM
>
> msrepl_tran_version is of SQL Server specific type uniqueidentifier,
> which is a 16-byte value. I don't know how it appears in the protocol,
> wheter it's the raw 16 bytes, or if it's a hex string (which
> is accepted
> as the input for such fields) on the form
> xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Arnar,
Thank you for the clarification. :-)
IIRC, sqsh doesn't understand datatype "uniqueidentifier". If anyone wants
to post a patch for sqsh to fix that, I'd be happy to apply it.
Whether or not PHP handles it, I don't know.
FreeTDS's built-in conversion functions can convert uniqueidentifier to
char/varchar and back. That feature became available in 0.60:
$ tsql -U$U -P$P -S$S
locale is "C"
locale charset is "646"
Msg 5703, Level 0, State 1, Server NTS0214, Line 0
Changed language setting to us_english.
1> create table #a(u uniqueidentifier, i int)
2> insert #a values (newid(), 1) select * from #a
3> go
u i
95B3E114-B023-11D7-BAA5-0004ACE38BF3 1
1>
--jkl
> On Mon, 7 Jul 2003 03:59:15 +0000 (GMT), Andrew Stevenson
> <andrews at ntt.net.au> wrote:
> > I have a database hosted under MS-SQL that I connect to via freetds
> > (0.60). The DB is replicated to another server and so the magical
> field
> > msrepl_tran_version appears in all the tables. I am unable to run a
> > query that returns this field.
> >
> > Using sqsh I get no results, just the colomn headings.
> Using perl/DBI
> I
> > get:
> >
> > error_handler: Data-conversion resulted in overflow.
-----------------------------------------
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 we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.
More information about the FreeTDS
mailing list