dbTalk Databases Forums  

ToString UDT

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss ToString UDT in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
William Stacey [MVP]
 
Posts: n/a

Default ToString UDT - 01-12-2006 , 05:01 PM






My UDT works fine on the server and ToString() will work on the type in a
Select. However, even if I install .dll into GAC, SSMS will not display my
UDT as a string (i.e. does not call ToString()) so I get byte display
instead of string. Anyone know what to look for (i.e. error log, etc.)?

--
William Stacey [MVP]




Reply With Quote
  #2  
Old   
Jens
 
Posts: n/a

Default Re: ToString UDT - 01-12-2006 , 05:38 PM






I think it doesn call the tostring Method, but your implementation of
the UDT is defined in the attributes of the class as UserDefined. With
overriding the ToString() method and implementing you own this should
work for you.

HTH, Jens Suessmeyer.


Reply With Quote
  #3  
Old   
William Stacey [MVP]
 
Posts: n/a

Default Re: ToString UDT - 01-12-2006 , 06:07 PM



That is the question. I have the ToString() override already. It is not
called. Others in blogs say this should work using SSMS, but mine does not.
One post said it would not work in RTM, so I am not sure if it even should
work or not. And SSMS or Help gives not help I found yet.

--
William Stacey [MVP]

"Jens" <Jens (AT) sqlserver2005 (DOT) de> wrote

Quote:
I think it doesn call the tostring Method, but your implementation of
the UDT is defined in the attributes of the class as UserDefined. With
overriding the ToString() method and implementing you own this should
work for you.

HTH, Jens Suessmeyer.




Reply With Quote
  #4  
Old   
Adam Machanic
 
Posts: n/a

Default Re: ToString UDT - 01-13-2006 , 10:19 AM



As far as I know, that's correct behavior. SSMS will never call ToString()
for you automatically.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote

Quote:
My UDT works fine on the server and ToString() will work on the type in a
Select. However, even if I install .dll into GAC, SSMS will not display
my UDT as a string (i.e. does not call ToString()) so I get byte display
instead of string. Anyone know what to look for (i.e. error log, etc.)?

--
William Stacey [MVP]






Reply With Quote
  #5  
Old   
William Stacey [MVP]
 
Posts: n/a

Default Re: ToString UDT - 01-13-2006 , 11:27 AM



I know it did at one point as I see blog posts about it. Maybe not in RTM.

--
William Stacey [MVP]

"Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote

Quote:
As far as I know, that's correct behavior. SSMS will never call
ToString() for you automatically.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote in message
news:%23NqVmw8FGHA.2212 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
My UDT works fine on the server and ToString() will work on the type in a
Select. However, even if I install .dll into GAC, SSMS will not display
my UDT as a string (i.e. does not call ToString()) so I get byte display
instead of string. Anyone know what to look for (i.e. error log, etc.)?

--
William Stacey [MVP]








Reply With Quote
  #6  
Old   
Adam Machanic
 
Posts: n/a

Default Re: ToString UDT - 01-13-2006 , 03:00 PM



Right -- it was removed, IIRC, in the September CTP.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote

Quote:
I know it did at one point as I see blog posts about it. Maybe not in RTM.

--
William Stacey [MVP]

"Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote in message
news:%23OGpy0FGGHA.2680 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
As far as I know, that's correct behavior. SSMS will never call
ToString() for you automatically.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote in message
news:%23NqVmw8FGHA.2212 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
My UDT works fine on the server and ToString() will work on the type in
a Select. However, even if I install .dll into GAC, SSMS will not
display my UDT as a string (i.e. does not call ToString()) so I get byte
display instead of string. Anyone know what to look for (i.e. error
log, etc.)?

--
William Stacey [MVP]










Reply With Quote
  #7  
Old   
William Stacey [MVP]
 
Posts: n/a

Default Re: ToString UDT - 01-13-2006 , 07:24 PM



Anyone know why this is? It would have seemed to be bone simple to at least
add a check box in options to enable/disable this feature.

--
William Stacey [MVP]

"Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote

Quote:
Right -- it was removed, IIRC, in the September CTP.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote in message
news:OvlHiaGGGHA.3080 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I know it did at one point as I see blog posts about it. Maybe not in
RTM.

--
William Stacey [MVP]

"Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote in message
news:%23OGpy0FGGHA.2680 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
As far as I know, that's correct behavior. SSMS will never call
ToString() for you automatically.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote in message
news:%23NqVmw8FGHA.2212 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
My UDT works fine on the server and ToString() will work on the type
in
a Select. However, even if I install .dll into GAC, SSMS will not
display my UDT as a string (i.e. does not call ToString()) so I get
byte
display instead of string. Anyone know what to look for (i.e. error
log, etc.)?

--
William Stacey [MVP]












Reply With Quote
  #8  
Old   
Adam Machanic
 
Posts: n/a

Default Re: ToString UDT - 01-13-2006 , 08:34 PM



Agreed... Put in a "suggestion" and I'll vote for it...

http://lab.msdn.microsoft.com/productfeedback


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote

Quote:
Anyone know why this is? It would have seemed to be bone simple to at
least
add a check box in options to enable/disable this feature.

--
William Stacey [MVP]

"Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote in message
news:e$GGwRIGGHA.1452 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
| Right -- it was removed, IIRC, in the September CTP.
|
|
| --
| Adam Machanic
| Pro SQL Server 2005, available now
| http://www.apress.com/book/bookDisplay.html?bID=457
| --
|
|
| "William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote in message
| news:OvlHiaGGGHA.3080 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
| >I know it did at one point as I see blog posts about it. Maybe not in
RTM.
|
| > --
| > William Stacey [MVP]
|
| > "Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote in
message
| > news:%23OGpy0FGGHA.2680 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
| >> As far as I know, that's correct behavior. SSMS will never call
| >> ToString() for you automatically.
|
|
| >> --
| >> Adam Machanic
| >> Pro SQL Server 2005, available now
| >> http://www.apress.com/book/bookDisplay.html?bID=457
| >> --
|
|
| >> "William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote in message
| >> news:%23NqVmw8FGHA.2212 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
| >>> My UDT works fine on the server and ToString() will work on the type
in
| >>> a Select. However, even if I install .dll into GAC, SSMS will not
| >>> display my UDT as a string (i.e. does not call ToString()) so I get
byte
| >>> display instead of string. Anyone know what to look for (i.e. error
| >>> log, etc.)?
|
| >>> --
| >>> William Stacey [MVP]
|
|
|
|
|
|
|
|
|





Reply With Quote
  #9  
Old   
William Stacey [MVP]
 
Posts: n/a

Default Re: ToString UDT - 01-13-2006 , 10:45 PM



FDBK43960
Cheers.

--
William Stacey [MVP]

"Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote

Quote:
Agreed... Put in a "suggestion" and I'll vote for it...



Reply With Quote
  #10  
Old   
Adam Machanic
 
Posts: n/a

Default Re: ToString UDT - 01-13-2006 , 11:21 PM



For others reading this thread who want to cast a vote:

http://lab.msdn.microsoft.com/produc...a-d22a4ed31ecc


--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--


"William Stacey [MVP]" <william.stacey (AT) gmail (DOT) com> wrote

Quote:
FDBK43960
Cheers.

--
William Stacey [MVP]

"Adam Machanic" <amachanic (AT) hotmail (DOT) _removetoemail_.com> wrote in message
news:eJfmIMLGGHA.1032 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
| Agreed... Put in a "suggestion" and I'll vote for it...





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.