在asp.net中使用数据集 [英] Using datasets in asp.net

查看:91
本文介绍了在asp.net中使用数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经在我的asp.net网页上插入了一个数据集,使用Add New Item>>数据集。我已将其与数据库中的表格绑定,并通过右键单击预览数据预览数据但是问题是通过代码预览数据。



我对使用vb.net中的数据集,但我想知道如何在asp.net中使用它们。



我只是想通过填充TableAdapter来使用它们,因为





Hi,
I have inserted a dataset to my asp.net webpage, using Add New Item >> Dataset. I have bound it with my table in DB and also previewed data by right clicking Preview Data BUT the problem is previewing data through code.

I am quite familiar with using the datasets in vb.net but I wonder how to use them in asp.net.

I am simply tring to use through filling the TableAdapter, as


Me.TblSQsTableAdapter.Fill(Me.DsSQs.tblSQs, vrExamIDSetPaper)





但是当我按下时,dsSQs(我的数据集名称)不会使表名下雪。正如我们在vb.net winforms中所做的那样。



我想得到否定。给定参数下的行数。例如vrExamIDSetPaper



Plesae帮助。

谢谢



but dsSQs (my dataset name) does not snow the table name when I press . as we do in vb.net winforms.

I want to get no. of rows that come under given parameter. e.g vrExamIDSetPaper

Plesae help.
Thanks

推荐答案

你不是获取表名,因为它是非类型化数据集,只能在类型化数据集中获取表名。



尝试使用YourDataset.Tables [0] .Rows.Count



查找总行数
You are not getting table name because it is untyped dataset and you get table names only in typed dataset.

try to use YourDataset.Tables[0].Rows.Count

to find total no of rows


这篇关于在asp.net中使用数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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