页面传值验证(防SQL注入)
Global.asax文件中
在页面跳转时,防止传值的参数中SQL注入:
void Application_BeginRequest(object sender, EventArgs e)
{
ProcessRequest();
}
void ProcessRequest()
{
try
{
if (HttpContext.Current.Request.Form.Count > 0)
{
NameValueCollection collection = HttpContext.Current.Request.Form;
foreach (string strKeys in collection.AllKeys)
{
if (strKeys == "__VIEWSTATE")
{
continue;
}
else
{
if (!CheckRequest(collection.Get(strKeys)))
{
System.Web.HttpContext.Current.Response.End();
}
}
}
}
&nbs
相关文档:
函数
SQLServer和Oracle的常用函数对比
1.绝对值
S:select abs(-1) value
O:select abs(-1) value from dual
2.取整(大)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.取整(小)
S:select floor(-1.001) value
O:select floor(-1.001 ......
在现代的多用户多任务系统中,必然会出现多个用户同时访问共享的某个对象,这个对象可能是表,行,或者内存结构,为了解决多个用户并发性访问带来的数据的安全性,完整性及一致性问题,必须要有一种机制,来使对这些共享资源的并发性访问串行化,oracle中的锁就可以提供这样的功能,当事务在对某个对象进行操作前,先向系统 ......
平时很少用SQL Server 2008,偶尔用一次,还真是遇到了一些问题,几经周折,从官网上才找到解决办法:
问题描述:登陆后,点击数据库,出现服务器主体 "xxxcom" 无法在当前安全上下文下访问数据库 "db_xxx_com"。
问题原因:SQL Server 2008 bug
问题解决办法(非原创,参考官网):
1、用SQL Server Management Studi ......
sql server
替换null:isnull(arg,value)
如:select isnull(price,0.0) from orders ,如果price为null的话,用0 ......