摘要: SqlDataAdapter.UpdateCommand如下"update Student set ID=@ID where ID=@ID"这样写当修改id的时候会出现,错误:违反并发性。。因为id改变了where 后面的id和前面的id是不一样的解决方法:"update Student set ID=@ID where ID=@ID2"SqlParameterpID2 = new SqlPara... 阅读全文
posted @ 2010-11-08 17:46 sweetjian 阅读(667) 评论(0) 推荐(1)
摘要: XtraReport1 report1 = new XtraReport1();XtraReport2 report2 = new XtraReport2();PrintingSystem printingSystem1 = new PrintingSystem();printBarManager1.PrintControl.PrintingSystem = printingSystem1;Pag... 阅读全文
posted @ 2010-11-03 16:46 sweetjian 阅读(5062) 评论(0) 推荐(0)
摘要: 如果你是使用虚拟主机等不能访问物理的服务器,你仍然能够通过编程方式加密的连接字符串:1 Configuration config = Configuration.GetWebConfiguration(Request.ApplicationPath); //或者 Configuration config =WebConfigurationManager.OpenWebConfiguration(R... 阅读全文
posted @ 2010-10-28 23:36 sweetjian 阅读(377) 评论(0) 推荐(0)
摘要: chart属性->UI->Command集合编辑器 添加然后捕获事件chart1.CommandFired+=new Dundas.Charting.WinControl.Chart.CommandFiredEventHandler(chart1_CommandFired);private void chart1_CommandFired(object sender, Dundas.C... 阅读全文
posted @ 2010-10-27 17:43 sweetjian 阅读(282) 评论(0) 推荐(0)
摘要: 第一步:属性->ChartArea集合编辑器->Axis集合编辑器->Secondary y(Value) axis Enabled设为true第二步:属性->Series集合编辑器->选择要绑定的Series1->YAxisType 设为 Secondary第三步:serie.Points.DataBindXY()函数绑定数据 阅读全文
posted @ 2010-10-27 17:39 sweetjian 阅读(401) 评论(0) 推荐(0)
摘要: Vs2008兼容vs2005 的项目;但vs2008的项目却不能放在vs2005中,将vs2008 项目 转换成到2005 下的解决方法:总共分为两个步骤:l 修改解决方案文件:解决方案.sln Microsoft Visual Studio Solution File, Format Version 10.00[w1] # Visual Studio 2008[w2] l 修改项目文件:项目.... 阅读全文
posted @ 2010-10-26 12:21 sweetjian 阅读(286) 评论(0) 推荐(0)
摘要: static void Main() { AutoResetEvent autoEvent = new AutoResetEvent(false); Thread regularThread = new Thread(new ThreadStart(ThreadMethod)); regularThread.IsBackground = true; regularThread.Start(); ... 阅读全文
posted @ 2010-10-25 19:38 sweetjian 阅读(205) 评论(0) 推荐(0)
摘要: Access里like的通配符用法是这样: “?”表示任何单一字符;“*”表示零个或多个字符;“#”表示任何一个数字 所以应该是: select*fromdatabasenamewherefieldnamelike'*XX*' 原来在SQLSERVER里是用%%的,在ACCESS里是用**号的,怪不得都找不到数据! 但如果在V... 阅读全文
posted @ 2010-10-25 11:51 sweetjian 阅读(294) 评论(0) 推荐(0)
摘要: 工具-->选项--> 文本编辑器-->自动检测不带签名的UTF-8编码(打上对钩)重新打开项目 阅读全文
posted @ 2010-10-22 12:12 sweetjian 阅读(1328) 评论(0) 推荐(0)
摘要: //模拟注册 HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://login.sina.com.cn/signup/signup1.php"); request.CookieContainer = cookies; request.Method = "POST"; request.Accept = "text/htm... 阅读全文
posted @ 2010-10-18 09:31 sweetjian 阅读(1441) 评论(0) 推荐(0)