c# - In Function Import, The selected stored procedure returns no columns -
i have written stored procedure insert values table primary key auto incremented. when try import in visual studio 2013, in function imports when select "get column information" says "the selected procedure or function" returns no columns.
i read many articles , included set fmtonly off in code still not work. amateur in asp.net , c#. can explain me in clear manner
use [db_name] go /****** object: storedprocedure [dbo].[usp_makepost] script date: 04-04-2015 19:16:04 ******/ set fmtonly off go set ansi_nulls on go set quoted_identifier on go create procedure [dbo].[usp_makepost] @fk_struser_id varchar(11), @strpost_title varchar(100), @strpost_content varchar(1000), @dtime_of_post datetime, @iup_vote int, @idown_vote int, @fk_strrootword_id varchar(11) begin declare @pk_strpost_id varchar(11); declare @prefix varchar(10) = 'post'; declare @id int; select @id = isnull(count(pk_strpost_id),0) + 1 tbl_post select @pk_strpost_id = @prefix + right('0000' + cast(@id varchar(7)), 7) insert tbl_name values(@pk_strpost_id,@fk_struser_id,@strpost_title,@strpost_content,@dtime_of_post,@iup_vote,@idown_vote,@fk_strrootword_id) end
your stored procedure doesn't data retrieve operation (ie, select
). insert
plus variable manipulation. select
s out there assign variables too, nothing produces kind of result set.
therefore client programs right in there no columns or kind of output procedure. maybe intended add sort of return table?