| DataSet对象和表名。DataSet必须在填充数据之前被实例化。第二个参数是将要在DataSet中创建的表的名字。你能够以你希望的任何名字对表命名。这要求能够用一个有意义的名字来标识表,以便以后使用。通常,我使用与数据库中表相同的名字来命名。然而,如果SqlDataAdapter的select命令包含多表连接,你将需要另外找一个有意义的名字。
The Fill method has an overload that accepts one parameter for the DataSet only. In that case, the table created has a default name of "Table1" for the first table. The number will be incremented (Table2, Table3, ..., TableN) for each table added to the DataSet where the table name was not specified in the Fill method.
Fill方法有另外一个重载的方式,它只接受DataSet一个参数。在这种情况中,对于第一个表的默认名字是“Table1”。如果没有在Fill方法中指定名字,每一个添加到DataSet中的表名数字都将会自增(Table2,Table3,….TableN)。
Using the DataSet
使用DataSet
A DataSet will bind with both ASP.NET and Windows Forms DataGrids. Here''''s an example that assigns the DataSet to a Windows Forms DataGrid:
DataSet将能够与ASP.NET和Windows Forms的DataGrid控件相绑定。下面是将 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >> |