Skip to Content.
Sympa Menu

freetds - Re: [freetds] About hierarchyid datatype

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Velichko Yuriy <velichko.yuriy AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] About hierarchyid datatype
  • Date: Wed, 5 Feb 2014 16:22:17 +0200

Thanks for support this request!
At this time I have different task, and can't to check the behaviour of
ODBC.

About client side: I want to get ability to show user the string of
ierarchy like
/
/1/
(http://technet.microsoft.com/en-us/library/bb677290.aspx)

For example dbForge can show this fields. ( of course they use another
protocol)


On 5 February 2014 00:08, Frediano Ziglio <freddy77 AT gmail.com> wrote:

> Just a small update. I just pushed a patch with base support for this
> type. Well... base support in the sense FreeTDS does not loose sync
> with server when your queries return this type. The type mainly is
> encoded similarly to VARBINARY(MAX) beside it has some additional
> fields in the metadata to return the CLR type. Obviously some types
> are defined by default (like hierarchyid). I don't really know what
> should be the support on the client side. Does MS ODBC return this
> type as binary or can even convert defined types (probably to string)
> ?
>
> Frediano
>
> 2014-02-03 Frediano Ziglio <freddy77 AT gmail.com>:
> > 2014-01-24 Frediano Ziglio <freddy77 AT gmail.com>:
> >>
> >> Il 22/gen/2014 21:27 "Velichko Yuriy" <velichko.yuriy AT gmail.com> ha
> scritto:
> >>
> >>
> >>>
> >>> Now the method:
> >>> dbcoltype()
> >>> returns SYBBINARY for hierarchyid datatype. in result no way to cast
> such
> >>> data to the string like '/1/2'
> >>>
> >>> The CAST function can convert hierarchyid to varchar:
> >>>
> >>> http://technet.microsoft.com/en-us/library/ms187928(v=sql.105).aspx
> >>>
> >>> May be is not so hard to implement the proper behaviour for
> dbcoltype()
> >>> and dbconvert() functions to have ability to fetch data in "readable"
> >>> form?
> >>>
> >>> Thanks!
> >>>
> >>
> >> Well, there are actually a couple of problems.
> >>
> >> 1. It's not easy to add a new type;
> >> 2. We do not fully even support 2008 while this type is 2012;
> >> 3. Dblib has to be extended to support new types.
> >>
> >
> >
> > Hi,
> > I'll correct myself, this type was added in mssql 2008. Never
> > used... beside point 2 all others remains.
> >
> > Frediano
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



--
Best Regards!




Archive powered by MHonArc 2.6.24.

Top of Page