FillByParent


Author
Message
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
If I attempt to use the FillByParent Method where the Parent has more than 2100 records the method fails with the following exception. I may have a few places where it is possible that the user can select more than 2100 parent records and a fill by parent would be called. I havent looked into how the fillbyparent method works yet but was hoping for any suggestions on how to best handle this.

Thanks

Paul

InnerException: System.Data.SqlClient.SqlException
       Class=16
       ErrorCode=-2146232060
       LineNumber=1
       Message="The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100."
       Number=8003
       Procedure=""
       Server="ares"
       Source=".Net SqlClient Data Provider"
       State=1

Replies
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you go the CLR UDF route, your query would then look like this:

SELECT [fields] FROM ChildTable AS CT INNER JOIN dbo.Udf_ByteParser(@pks) AS BP ON CT.foreignkey = BP.primarykey

The @pks would be the byte[] containing the pk values

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Thanks Ben,

I was thinking along the lines of the first suggestion you had anways , I just haven't gotten back to it yet, it should be an infrequent thing but it is possible and valid for a user to need that much data so for the time being I put in a freindly message that lets the user know that they are selecting to many records and bail just to keep the whining to a minumum. most likely I will implement the first route and come back to the CLR to improve perfomance.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search