NET岛

导航

2005年8月22日

在ADO.net 中使用xml

摘要: System.Xml.XmlReader myReader;...myReader = mySqlCommand.ExecuteXmlReader();DataSetDataSet myDataSet = new DataSet();读myDataSet.ReadXml("C:\\myData.XML");结构myDataSet.ReadXmlSchema("C:\\mySchema.XML");... 阅读全文

posted @ 2005-08-22 23:50 左佩玉 阅读(443) 评论(0) 推荐(0) 编辑

绑定、查看和筛选数据

摘要: 绑定字符串 String[] myStrings = new String[3]; myStrings[0] = "A"; myStrings[1] = "String"; myStrings[2] = "Array"; TextBox1.DataBindings.Add("Text",myStrings,""); 删除数据绑定 Label1.DataBi... 阅读全文

posted @ 2005-08-22 17:36 左佩玉 阅读(543) 评论(0) 推荐(0) 编辑

ADO.net

摘要: Command 对象 ExecuteNonQuery 执行没有返回值得命令 ExecuteScalar 返回一个单独的值 ExecuteReader 通过DataReader对象返回一个结果集 CommandType属性,用于说明CommandText属性类型 Text:SQL文本命令 StoredProcedure 存储过程 TableDirect 一个表或多个表 参数 O... 阅读全文

posted @ 2005-08-22 14:46 左佩玉 阅读(889) 评论(1) 推荐(0) 编辑

处理和抛出异常

摘要: try{}catch (System.Exception e){ throw new System.Exception("error",e);}catch{ throw;}finally{}抛出异常throw e;自定义异常public class WidgetException:System.ApplicationException{ Widget mWidget; publi... 阅读全文

posted @ 2005-08-22 12:16 左佩玉 阅读(472) 评论(0) 推荐(0) 编辑

使用Debug和Trace

摘要: 写入Listeners集合 Write WriteLine WriteIf WriteLineIf Assert 如果布尔表达式微False,将断言信息写入Listeners,并显示消息框 Fail 直接将断言信息写入Listeners,并显示消息框 Indent,Unindent 设置缩进程度输出记录到文本System.IO.FileStream myLog = new Sys... 阅读全文

posted @ 2005-08-22 11:24 左佩玉 阅读(461) 评论(0) 推荐(0) 编辑