sql查询
摘要:student kemuA语文A 语文A 数学B语文B 数学如何实现查询:student 语文 数学A 2 1B 11SQL:select student ,sum(case kemu when '语文' then 1 esle 0 end) 语文, sum(case kemu when '数学then 1 esle 0 end) 数学from table group by student
阅读全文
posted @
2013-01-10 11:38
HonestPeople
阅读(132)
推荐(0)
HttpHandler与HttpModule
摘要:用HttpModule实现登陆验证:大家在作登录时,登录成功后,一般要把用户名放在Session中保存,在其它每一个页面的Page_Load事件中都检查Session中是否存在用户名,如果不存在就说明用户未登录,就不让其访问其中的内容。 在比较大的程序中,这种做法实在是太笨拙,因为你几乎要在每一个页面中都加入检测Session的代码,导致难以开发和维护。下面我们看看如何使用HttpModule来减少我们的工作量 由于在这里我们要用到Session中的内容,我们只能在AcquireRequestState和PreRequestHandlerExecute事件中编写代码,因为在HttpModu..
阅读全文
posted @
2013-01-07 17:40
HonestPeople
阅读(236)
推荐(0)
重写与覆盖
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{public class A{public A(){PrintFields();}public virtual void PrintFields() { Console.Write("test"); }}public class B : A{int x = 1;int y;public B(){y = -1;}public new void PrintF
阅读全文
posted @
2013-01-07 14:59
HonestPeople
阅读(372)
推荐(0)
如何获取一张表的字段名
摘要:如何取得一个数据表的所有列名 SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='users'通过SQL语句来更改用户的密码修改别人的,需要sysadmin roleEXEC sp_password NULL, 'newpassword', 'User'如果帐号为SA执行EXEC sp_password NULL, 'newpassword', sa
阅读全文
posted @
2013-01-06 16:58
HonestPeople
阅读(273)
推荐(0)
数据库优化工具及如何进行优化
摘要:http://www.cnblogs.com/chillsrc/archive/2009/09/21/1571444.html 下一篇:http://www.cnblogs.com/chillsrc/archive/2009/09/23/1572743.html
阅读全文
posted @
2013-01-06 11:46
HonestPeople
阅读(141)
推荐(0)
iis7部署mvc2
摘要:http://www.cnblogs.com/yeminglong/archive/2012/05/11/2496348.html说明:1,不用启用父路径。2.将上面的。net版本换成你使用的framework
阅读全文
posted @
2013-01-01 13:30
HonestPeople
阅读(201)
推荐(0)