﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / table value functions / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 02:49:24 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: table value functions</title><link>http://www.sqlservercentral.com/Forums/Topic1422026-391-1.aspx</link><description>have you captured a trace  of that new C# code running?</description><pubDate>Wed, 20 Feb 2013 11:55:38 GMT</pubDate><dc:creator>mister.magoo</dc:creator></item><item><title>RE: table value functions</title><link>http://www.sqlservercentral.com/Forums/Topic1422026-391-1.aspx</link><description>fixed the C# code :[code="vb"]SqlCommand cmd = new SqlCommand("casp_GetExist", cnt);            SqlParameter parameter = new SqlParameter();            cmd.CommandType = CommandType.StoredProcedure;            //The parameter for the SP must be of SqlDbType.Structured             parameter.ParameterName = "@BLMJ_LIST";            parameter.TypeName = "CampaignIdList";             parameter.SqlDbType = System.Data.SqlDbType.Structured;            parameter.Value = dataTable;            cmd.Parameters.Add(parameter);            SqlDataReader sqlDR = cmd.ExecuteReader();[/code]but dont get recordset on :sqlDR </description><pubDate>Wed, 20 Feb 2013 06:33:10 GMT</pubDate><dc:creator>peleg</dc:creator></item><item><title>RE: table value functions</title><link>http://www.sqlservercentral.com/Forums/Topic1422026-391-1.aspx</link><description>Maybe what you really need to do is post the C# code as that seems to be calling wrong...</description><pubDate>Wed, 20 Feb 2013 06:12:16 GMT</pubDate><dc:creator>mister.magoo</dc:creator></item><item><title>RE: table value functions</title><link>http://www.sqlservercentral.com/Forums/Topic1422026-391-1.aspx</link><description>Because you are declaring a parameter for the sp_executesql to use, but not actually using it in the query to execute...You can either change the last line to this:[code="sql"]execute sp_executesql N'exec casp_GetExist @BLMJ_LIST',N'@BLMJ_LIST CampaignIdList READONLY',@p3;[/code]or this[code="sql"]exec casp_GetExist @BLMJ_LIST=@p3;[/code]</description><pubDate>Wed, 20 Feb 2013 06:11:38 GMT</pubDate><dc:creator>mister.magoo</dc:creator></item><item><title>table value functions</title><link>http://www.sqlservercentral.com/Forums/Topic1422026-391-1.aspx</link><description>i am passing table from C# to sql.on sql this is my code :[code="sql"]CREATE TYPE [dbo].[CampaignIdList] AS TABLE( [BLMJ] NVARCHAR(50) NOT NULL )GOCREATE PROCEDURE [dbo].[casp_GetExist] 	@BLMJ_LIST CampaignIdList READONLYASBEGIN	SET NOCOUNT ON; Select * from @BLMJ_LISTENDGO[/code]then i take the code as i see it on the profiler :[code="sql"]declare @p3 dbo.CampaignIdListinsert into @p3 values(N'1247')insert into @p3 values(N'1261')insert into @p3 values(N'1277')insert into @p3 values(N'1279')insert into @p3 values(N'1289')select * from  @p3 --&amp;gt;&amp;gt; isee that there is data in @p3 execute sp_executesql N'exec casp_GetExist',N'@BLMJ_LIST CampaignIdList READONLY',@p3[/code]when i run the code that i take from the profiler, and i expect for resultfrom the query :  Select * from @BLMJ_LISTi get no rows as result.any idea why?</description><pubDate>Wed, 20 Feb 2013 05:09:26 GMT</pubDate><dc:creator>peleg</dc:creator></item></channel></rss>