gridview填充不在表中的数据 [英] gridview fill with data which is not in table
本文介绍了gridview填充不在表中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ALTER PROCEDURE dbo.select_data
AS
Declare @OutResult int
set @OutResult =''50''
SELECT [user_id], name1, address, mob, city, emailid
FROM [user.]
RETURN
< br $>
i有表:用户
字段是:
用户ID
name1
地址
mob
city
emailid
i已经采用gridview,根据这个选择查询显示数据。
现在我必须显示OutResult与这个现有的data.OutResult不在任何表中。
怎么做?
i have table : User
fields are:
Userid
name1
address
mob
city
emailid
i have taken gridview in which data is display according to this select query.
now i have to display OutResult with this exsisting data.OutResult is not in any table.
How to do this?
推荐答案
使用它来声明OutResult,因为这不在任何表中
声明@OutResult int
设置@OutResult =''50'';
但告诉我你在哪里必须存储此值或只想显示此
use this to declare OutResult as this not in any table
Declare @OutResult int
set @OutResult=''50'';
but tell me where you have to store this value or just want to display this
使用此
use this
ALTER PROCEDURE dbo.select_data
AS
Declare<pre lang="cs">@OutResult int
set @OutResult='50';
SELECT [user_id],@OutResult as OutResult, name1, address, mob, city, emailid
FROM [user.]
以及使用reader的存储过程的地方.HasRows将对此进行检索并使用此功能你想要的任何地方
and where you are using your stored procedure using reader.HasRows retrive this and use this anywhere you want
这篇关于gridview填充不在表中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文