在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