Exception when use TVP in CLR and cross database queries. - by Raol

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 777155 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/22/2013 7:08:44 AM
Access Restriction Public

Description

When table value parameters is used from ADO.NET inside CLR procedure, error occurs if CLR procedure is called via cross database query from another database.
Please see below. 
The case is strange from my viewpoint as in both functions the same TVP is used. But in one case SQL tries to instantiate it from CallerDB and in other one from the CalleeDB.
Sign in to post a comment.
Posted by Microsoft on 2/13/2013 at 2:48 PM
Hello,
We looked at this issue and the behavior has been in the product since the SQLCR beginning. At this point, we have no intention of changing the behavior or design. Our general recommendation is to keep databases self-contained for maximum application portability and there are cases like this (SQLCLR or otherwise) where you may get unexpected results.

--
Umachandar, SQL Programmability Team