扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
[WebMethod] public DataTable GetInfo() ...{ OleDbConnection nwindConn = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=D:\\Northwind\\northwind.mdb;"); OleDbCommand selectCMD = new OleDbCommand("SELECT CustomerID, CompanyName FROM Customers" , nwindConn); selectCMD.CommandTimeout = 30; OleDbDataAdapter custDA = new OleDbDataAdapter(); custDA.SelectCommand = selectCMD; DataSet custDS = new DataSet(); custDA.Fill(custDS, "Customers"); return custDS.Tables[0]; } |
Explicit Interface Implementations System.ComponentModel.IListSource.get_ContainsListCollection System.ComponentModel.IListSource.GetList System.Xml.Serialization.IXmlSerializable.GetSchema System.Xml.Serialization.IXmlSerializable.ReadXml System.Xml.Serialization.IXmlSerializable.WriteXml |
Explicit Interface Implementations System.ComponentModel.IListSource.ContainsListCollection |
private static void DemonstrateMergeTable() ...{ DataTable table1 = new DataTable("Items"); DataColumn column1 = new DataColumn("id", typeof(System.Int32)); DataColumn column2 = new DataColumn("item", typeof(System.Int32)); table1.Columns.Add(column1); table1.Columns.Add(column2); table1.PrimaryKey = new DataColumn[] ...{ column1 }; table1.RowChanged += new System.Data.DataRowChangeEventHandler(Row_Changed); DataRow row; for (int i = 0; i <= 3; i++) ...{ row = table1.NewRow(); row["id"] = i; row["item"] = i; table1.Rows.Add(row); } // Accept changes. table1.AcceptChanges(); DataTable table2 = table1.Clone(); row = table2.NewRow(); row["id"] = 14; row["item"] = 774; table2.Rows.Add(row); row = table2.NewRow(); row["id"] = 12; row["item"] = 555; table2.Rows.Add(row); row = table2.NewRow(); row["id"] = 13; row["item"] = 665; table2.Rows.Add(row); // Merge table2 into the table1. table1.Merge(table2); } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者