dataset的问题--关于手动组织数据
我想用dataset组织一些读取来的信息,成一个表!但是数据却没有想我原本预计的那样显示出来!以下是简化的代码:
<%@ Page Language= "VB " Debug= "true "%>
<%@ Import Namespace = "system.IO " %>
<%@ Import Namespace = "system.Data " %>
<script runat= "server ">
Sub page_load(ByVal sender As Object, ByVal e As EventArgs)
Dim FileMsgDataset As New DataSet
Dim FileMsgTable As New DataTable '定义一个表对象
Dim TheColumn As DataColumn '定义一个列
TheColumn = New DataColumn '一个列实例,一个标识列
TheColumn.DataType = System.Type.GetType( "System.Int32 ") '列值类型
TheColumn.ColumnName = "ID " '列名
TheColumn.AutoIncrement = True '自动编号
TheColumn.AutoIncrementSeed = 1 '初始值
TheColumn.AutoIncrementStep = 1 '自动增长值
FileMsgTable.Columns.Add(TheColumn) '将列加入表实例
TheColumn = New DataColumn
TheColumn.DataType = System.Type.GetType( "System.String ")
TheColumn.ColumnName = "FileName "
FileMsgTable.Columns.Add(TheColumn)
TheColumn = New DataColumn
TheColumn.DataType = System.Type.GetType( "System.String ")
TheColumn.ColumnName = "FileClass "
FileMsgTable.Columns.Add(TheColumn)
TheColumn = New DataColumn
TheColumn.DataType = System.Type.GetType( "System.String ")
TheColumn.ColumnName = "FilePub "
FileMsgTable.Columns.Add(TheColumn)