You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using GetSchema("StructuredTypeMembers", ...) to get the schema for User-Defined-Table-Types, the type schema returned is alway "sys".
To reproduce:
use MyTemp
go
createschemaMySchema;
go
create type [dbo].[PostalCodeList] as table ([postalCode] varchar(10));
go
create type [MySchema].[PostalCodeList] as table ([postalCode] varchar(10), [country] char(2));
go
Looking at the SQL statement executed behind the scenes in SQL Profiler, it is returning the schema name from sys.objects.schema_id which always sys. The correct schema name should be obtained from sys.table_types.schema_id.
The text was updated successfully, but these errors were encountered:
When using GetSchema("StructuredTypeMembers", ...) to get the schema for User-Defined-Table-Types, the type schema returned is alway "sys".
To reproduce:
Output:
1: [sys].[PostalCodeList].[postalCode]
1: [sys].[PostalCodeList].[postalCode]
2: [sys].[PostalCodeList].[country]
Expected results:
1: [dbo].[PostalCodeList].[postalCode]
1: [MySchema].[PostalCodeList].[postalCode]
2: [MySchema].[PostalCodeList].[country]
Looking at the SQL statement executed behind the scenes in SQL Profiler, it is returning the schema name from
sys.objects.schema_id
which alwayssys
. The correct schema name should be obtained fromsys.table_types.schema_id
.The text was updated successfully, but these errors were encountered: