#22003/7/18 9:40:48
response.write(tables(0).rows(N)("字段")) 'N=位置,初使0
简单用dataView实现翻页的思路:
Dim DV As DataView = New DataView() '建立数据表视图
Dim DT As DataTable = New DataTable("My") '建立数据表
Dim keyDC As DataColumn '定义数据表的列
Dim DR As DataRow '定义数据表的行
Dim iii, jjj as int32
Dim intBegin as int32 = 0
Dim intEnd as int32 = 9
'下面的MyDataSource是数据源,类型为DataSet
For Each keyDC In MyDataSource.Tables("My").Columns '遍历数据源里表"MY"的每一列
DT.Columns.Add(keyDC.ColumnName, keyDC.DataType) '产生新行
Next
For iii = 0 to intEnd '将符合过滤条件的数据添加到dataview的新行
DR = DT.NewRow()
For jjj = 0 To DT.Columns.Count - 1
DR(jjj) = MyDataSource.Tables("My").Rows(iii)(jjj)
Next
DT.Rows.Add(DR)
Next
编辑历史:[这消息被makdh编辑过(编辑时间2003-07-18 09:43:36)]