Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Won't Fix Help for as Won't Fix


1
0
Sign in
to vote
Type: Bug
ID: 777155
Opened: 1/22/2013 7:08:44 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

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.
Details
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
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
Class1.cs 1/22/2013 2 KB