如何在sql视图中显示层应用程序中的数据 [英] How to display data's in tier application from sql view

查看:59
本文介绍了如何在sql视图中显示层应用程序中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的团队,

我是这个Web层应用程序的新手我需要知道如何将多个表输出'[Sql server view output]显示到Grid视图控件。为此我们需要创建任何类。

Dear Team,
I am new to this web tier application i need to know how can we display multiple table output''s [Sql server view output ]to Grid view control. For this do we need to create any class .

推荐答案

考虑我有两张桌子

部门和学生

创建表学生

(stuId int,stuName varchar(20),departmentId int)



创建表部门

(departmentId int,departmentName varchar(20))



创建视图vwGetall

as

选择s .stuName,d.departmentName

来自学生内部加入部门d

on s.departmentId = d.departmentId



如何通过使用对象绑定网格中的上述视图输出,如果我的想法是错误的PLZ ..纠正我



通过创建对象引用样本轮胎应用程序对于放在

学生中的学生表和读者输出然后它绑定所以我怀疑是否需要绑定多个表字段我需要做什么...
Consider i have two tables
Department and student
create Table Student
(stuId int , stuName varchar(20),departmentId int)

create table Department
(departmentId int , departmentName varchar(20))

create view vwGetall
as
Select s.stuName , d.departmentName
from Student s inner join Department d
on s.departmentId = d.departmentId

How do i bind the above view output in grid by using objects ,If my thought is wrong plz.. Correct me

Refering sample tire applications by create object for student table and reader output placed in
student then it bind so my doubt is if i need to bind multiple table fields what i need to do...


你可以解释一下如何从你的SQL服务器获取数据页面和您想要绑定网格的表格?
can u explain how u getting data from sql server to in your page and with which table your want to bind your grid ?


这篇关于如何在sql视图中显示层应用程序中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆