stored procedure with table type input parameter

Posts   
 
    
zsyed
User
Posts: 8
Joined: 23-Oct-2012
# Posted on: 23-Oct-2012 03:12:29   

My stored procedure definition is as follows:

===================== ALTER PROCEDURE [Framework].uspStringResourceAdd

@StringResourcesAndValues [dbo].[udtStringResourceAndValues] READONLY

where udtStringResourceAndValues is defined as follows:

========================================== CREATE TYPE [dbo].[udtStringResourceAndValues] AS TABLE ( [ID] [int], [Container] varchar NULL, [Key] varchar NULL, [Culture] varchar NULL, [StringResourceID] [int] NULL, [Value] nvarchar NULL

)

In GenPro.. when I refresh data model from database under Project Explorer.

After following through the prompts, under Catalog Explorer, I do see the stored procedure with input parameter but it appears to be defined as varchar..

After I generate the code..

I do see the following call.. but the input parameter "StringResourcesAndValues" is defined as "String" as opposed to table type that I can pass in set of records.

Problem: I want to be able to pass in set of records in .net generated code to the stored proc but the .net generated code only provides string input parameter.

Please help.

Thanks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 23-Oct-2012 06:14:10   

Sorry, but table parameters are not supported for now, and AFAIK it isn't planned for the near future. Please try to wrap your SP with another SP that receives simple parameters (that fields you have in your custom table type).

David Elizondo | LLBLGen Support Team