For example lets say i create a UDT "Point". I insert data in a table that has some columns of type point.
Now is there a way i can get the data of the type point in a point object in non .NET languages like perl, python...
Hi,
There's no special magic to doing this. If the UDT is defined using user-defined serialization, then you know the serialization format. You could pull the bytes out of the database and write a deserializer to a Python class, a Perl class, or whatever else you want. Obviously, you'll have to be careful to make sure the types align. E.g., ints shouldn't be too problematic, but I'm not sure how Python stores a datetime.
If the UDT is using native serialization, you could try to reverse engineer the serialization format. This is not supported, and you'll have to be a bit careful: SQL Server does some funky bit twiddling to preserve binary ordering (see here).
Hope this helps,
-Isaac
No comments:
Post a Comment