摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Linq; using System.Text; u... 阅读全文
posted @ 2008-11-22 13:49 Thinking.N 阅读(911) 评论(0) 推荐(0)
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Linq; using System.Text; usi... 阅读全文
posted @ 2008-11-22 11:07 Thinking.N 阅读(274) 评论(0) 推荐(0)
摘要: Code //注意如何给DataTable添加新行 DataRow newRow=dt.NewRow();//调用方法 ....... dt.Rows.Add(newRow); Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->usin... 阅读全文
posted @ 2008-11-22 10:29 Thinking.N 阅读(298) 评论(0) 推荐(0)
摘要: Code //构造一个DataView对象,传递死个函数 DataView dv=new DataView(dt,"country='Germany'","country",DataViewRowState.CurrentRows); 第一个参数:DataTable,第二个:对DataTable内容进行筛选的筛选器, 第三个是排序列,最后一个参数是指定要在视图中包含的行的类型. System... 阅读全文
posted @ 2008-11-21 21:14 Thinking.N 阅读(1290) 评论(1) 推荐(0)
摘要: 在调用Fill()方法时,如果连接没有打开,fill()就自动打开,在数据填充完毕后关闭它. 如果在调用Fill()方法时打开了连接,fill()就使用该连接,But won't close it after it uesd it ! 虽然数据集完全独立于与数据库和连接,但是使用数据集并不意味着和数据库断开连接. 如果要在断开的情况下运行就可以用数据集,但是在填充他之前不要打开l连接(或者如果... 阅读全文
posted @ 2008-11-21 20:40 Thinking.N 阅读(511) 评论(0) 推荐(0)
摘要: Code //先创建数据适配器, SqlDataAdapter da=new SqlDataAdapter(); da.SelectCommand=new SqlCommand(sql,conn); //创建和填充数据集 DataSet ds=new DataSet(); da.Fill(ds,"Customers"); //每个查询返回一个数据集,每个结果都保存在单独的DataTable... 阅读全文
posted @ 2008-11-21 20:27 Thinking.N 阅读(1627) 评论(0) 推荐(0)
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Linq; using System.Text; using ... 阅读全文
posted @ 2008-11-21 18:54 Thinking.N 阅读(227) 评论(0) 推荐(0)
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Linq; using System.Text; using ... 阅读全文
posted @ 2008-11-21 15:38 Thinking.N 阅读(377) 评论(0) 推荐(0)
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Linq; using System.Text; using ... 阅读全文
posted @ 2008-11-21 15:23 Thinking.N 阅读(633) 评论(0) 推荐(0)
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using System.Linq; using System.Text; using ... 阅读全文
posted @ 2008-11-21 15:22 Thinking.N 阅读(236) 评论(0) 推荐(0)