易截截图软件、单文件、免安装、纯绿色、仅160KB

防止页面在跳转的时候被SQL注入

首先写一个SQL注入过滤的类:
public class SqlFilter
{
#region SQL注入式攻击代码分析
/// <summary>
/// 处理用户提交的请求
/// </summary>
public void StartProcessRequest()
{
string getkeys = "";
string sqlErrorPage = "~/no.html";//转向的错误提示页面
try
{
if (System.Web.HttpContext.Current.Request.QueryString != null)
{
for (int i = 0; i < System.Web.HttpContext.Current.Request.QueryString.Count; i++)
{
getkeys = System.Web.HttpContext.Current.Request.QueryString.Keys[i];
if (!ProcessSqlStr(System.Web.HttpContext.Current.Request.QueryString[getkeys]))
{
System.Web.HttpContext.Current.Response.Redirect(sqlErrorPage,false);
System.Web.HttpContext.Current.ApplicationInstance.CompleteRequest();
//System.Web.HttpContext.Current.Response.End();
}
}
}
if (System.Web.HttpContext.Current.Request.Form != null)
{
for (int i = 0; i < System.Web.HttpContext.Current.Request.Form.Count; i++)
{
getkeys = System.Web.HttpContext.Current.Request.Form.Keys[i];
if (getkeys == "__VIEWSTATE") continue;
if (!ProcessSqlStr(System.Web.HttpContext.Current.Request.Form[getkeys]))
{
System.Web.HttpContext.Current.Response.Redirect(sqlErrorPage,false);
System.Web.HttpContext.Current.ApplicationInstance.CompleteRequest();
//System.Web.HttpContext.Current.Response.End();


相关文档:

db2 V8的有关SQL limits

The following tables describe certain SQL
limits. Adhering to the most restrictive case can help the programmer
design application programs that are easily portable.
Table 7. Identifier Length Limits
Description
Limit in Bytes
Longest authorization
name (can only be single-byte characters) ......

ms sql存儲過程參數返回值

create table tabReProc
 (    
 name varchar(30),    
 age integer,    
 primary key(name,age)    
 ) 
 insert into tabReProc values('x7700',20) 
 insert into tabR ......

【转】ACCESS中如何在SQL语句的WHERE条件中加日期条件

转自
http://topic.csdn.net/t/20050110/09/3711952.html
access中时间要用#,不是双引号  
  select   *   from   kc   where   rq   <   #2000-01-01#   and   rq>#2002-01-01#  
  不要用between,它的效率泰低  
使用# 而不是 ......

PL/SQL游标总结

游标:指向处理SQL语句的环境区域的指针或句柄
-----|-1 静态游标
       |---1.1 隐式游标
       |          处理:INSERT,DELETE,UPDATE及返回一行的SELECT语句
       | ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号