Previous Thread:   CLR Aggregate Parameters

3/1/2006 2:20:26 PM    UDT Discovery
So, I tell my developers to use a new UDT. How are they supposed to  
  
determine the underlying properties of this type? Unless I missed something,  
  
the Object Explorer in SSMS or the Server Explorer in VS does not seem to  
  
expand the properties.  
  
--  
  
____________________________________  
  
William (Bill) Vaughn  
  
Author, Mentor, Consultant  
  
Microsoft MVP  
  
INETA Speaker  
  
www.betav.com/blog/billva  
  
www.betav.com  
  
Please reply only to the newsgroup so that others can benefit.  
  
This posting is provided "AS IS" with no warranties, and confers no rights.  
  
__________________________________



3/2/2006 12:06:30 AM    Re: UDT Discovery
"William \(Bill\) Vaughn" <billvaRemoveThis@nwlink.com> wrote in  
  
news:utTAY5XPGHA.1696@TK2MSFTNGP14.phx.gbl:  
  
1. The same way you find out about the methods on any other type in SQL  
  
Server (like the methods of the XML type, TEXT type, the varchar(max)  
  
type), through documentation. The developers of the UDT do document the  
  
UDT, no?  
  
2. If the developers that will be using the UDT are using the UDT from  
  
some .NET app, they have to have the UDT locally available, so they can  
  
use ILDASM.  
  
3. As the binary of the assembly is stored in the database, you can  
  
quite easily whip up an app which reflects over the assembly.  
  
4. I saw a while ago (quite a while actually) that there was an add-in  
  
for Reflector which allowed you to use Reflector over an assembly in SQL  
  
Server. I have not tested it though.  
  
Niels  
  
--  
  
**************************************************  
  
* Niels Berglund  
  
* http://staff.develop.com/nielsb  
  
* nielsb@no-spam.develop.com  
  
* "A First Look at SQL Server 2005 for Developers"  
  
* http://www.awprofessional.com/title/0321180593  
  
**************************************************

3/2/2006 11:06:00 AM    Re: UDT Discovery
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> wrote in  
  
news:#lKahfiPGHA.2992@tk2msftngp13.phx.gbl:  
  
Noooooooo, you're kiddin', right?!! :-)  
  
Niels  
  
--  
  
**************************************************  
  
* Niels Berglund  
  
* http://staff.develop.com/nielsb  
  
* nielsb@no-spam.develop.com  
  
* "A First Look at SQL Server 2005 for Developers"  
  
* http://www.awprofessional.com/title/0321180593  
  
**************************************************

3/2/2006 1:33:58 PM    Re: UDT Discovery
"Niels Berglund" <nielsb@develop.com> wrote in message  
  
news:Xns977A527B59AFBnielsbdevelopcom@207.46.248.16...  
  
Come on Niels, don't you know that no developer ever documents ANYTHING?  
  
;)  
  
--  
  
Adam Machanic  
  
Pro SQL Server 2005, available now  
  
http://www.apress.com/book/bookDisplay.html?bID=457  
  
--

3/3/2006 2:16:38 PM    Re: UDT Discovery
1) Ha.  
  
The IDE should do this. (period).  
  
--  
  
____________________________________  
  
William (Bill) Vaughn  
  
Author, Mentor, Consultant  
  
Microsoft MVP  
  
INETA Speaker  
  
www.betav.com/blog/billva  
  
www.betav.com  
  
Please reply only to the newsgroup so that others can benefit.  
  
This posting is provided "AS IS" with no warranties, and confers no rights.  
  
__________________________________  
  
"Niels Berglund" <nielsb@develop.com> wrote in message  
  
news:Xns977A527B59AFBnielsbdevelopcom@207.46.248.16...

3/3/2006 2:31:19 PM    Re: UDT Discovery
"William \(Bill\) Vaughn" <billvaRemoveThis@nwlink.com> wrote in  
  
news:OCmykAxPGHA.456@TK2MSFTNGP15.phx.gbl:  
  
OK, so tell me - how does the IDE tell you what methods and properties  
  
other SQL types has?  
  
Niels  
  
--  
  
**************************************************  
  
* Niels Berglund  
  
* http://staff.develop.com/nielsb  
  
* nielsb@no-spam.develop.com  
  
* "A First Look at SQL Server 2005 for Developers"  
  
* http://www.awprofessional.com/title/0321180593  
  
**************************************************

3/3/2006 3:35:54 PM    Re: UDT Discovery
It lets me drill into Tables and see the columns and into columns to see the  
  
properties that include the datatype. That's all I want.  
  
--  
  
____________________________________  
  
William (Bill) Vaughn  
  
Author, Mentor, Consultant  
  
Microsoft MVP  
  
INETA Speaker  
  
www.betav.com/blog/billva  
  
www.betav.com  
  
Please reply only to the newsgroup so that others can benefit.  
  
This posting is provided "AS IS" with no warranties, and confers no rights.  
  
__________________________________  
  
"Niels Berglund" <nielsb@develop.com> wrote in message  
  
news:Xns977BE5192B894nielsbdevelopcom@207.46.248.16...

3/4/2006 9:12:23 AM    Re: UDT Discovery
"William \(Bill\) Vaughn" <billvaRemoveThis@nwlink.com> wrote in  
  
news:OcZ82sxPGHA.3728@tk2msftngp13.phx.gbl:  
  
Sure, but can you see that the column which is of the TEXT type, that the  
  
type exposes a write method?  
  
Niels  
  
--  
  
**************************************************  
  
* Niels Berglund  
  
* http://staff.develop.com/nielsb  
  
* nielsb@no-spam.develop.com  
  
* "A First Look at SQL Server 2005 for Developers"  
  
* http://www.awprofessional.com/title/0321180593  
  
**************************************************

3/4/2006 9:52:44 PM    Re: UDT Discovery
But those are properties of the column, not the type itself AFAICT.  UDTs  
  
show the same property grid. You are right, there should be an easy way to  
  
see the members of a UDT from the SQL UI.  My guess is it would take too  
  
much work because of the separate logic paths and another set of UI.  Hence  
  
a small problem now.  The SQL type system is now not unified, but two  
  
different type systems.  You have these raw types that have no properties or  
  
methods, and use helper functions to operate on the types.  Then you have  
  
..Net types (UDTs) that have a unified type system all deriving from Object -  
  
and they have properties and methods. That said, if your developing apps  
  
using the UDT, you have the UDTs at the client and can see the properties  
  
and methods in VS like any other struct.  From the server (i.e. sql script),  
  
we don't have intellisense anyway.  If we did, that would be the easiest way  
  
to see the members while writing scripts.  
  
--  
  
William Stacey [MVP]  
  
"William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message  
  
news:OcZ82sxPGHA.3728@tk2msftngp13.phx.gbl...  
  
the  
  
rights.