易截截图软件、单文件、免安装、纯绿色、仅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) ......

SQL命令大全 中英文对照

[code=SQL][/code]
--语 句 功 能 
--数据操作 
SELECT --从数据库表中检索数据行和列 
INSERT --向数据库表添加新数据行 
DELETE --从数据库表中删除数据行 
UPDATE --更新数据库表中的数据 
--数据定义 
CREATE TABLE --创建一个数据库表 
DROP TABLE --从数据 ......

SQL Convert的用法

CONVERT 函数 [数据类型转换]
--------------------------------------------------------------------------------
功能 
返回转换成提供的数据类型的表达式。
语法 
CONVERT ( data type, expression [ , format-style ] )
参数 
data&nbs ......

sql命令、函数

--语 句 功 能 
--数据操作 
SELECT --从数据库表中检索数据行和列 
INSERT --向数据库表添加新数据行 
DELETE --从数据库表中删除数据行 
UPDATE --更新数据库表中的数据 
--数据定义 
CREATE TABLE --创建一个数据库表 
DROP TABLE --从数据库中删除表 
......

怎样将oracle中的表导入sql server

1、在目的SQL Server数据库服务器上安装ORACLE Client软件或者ORACLE ODBC Driver.
通过oracle客户端,在netmanager中建立“服务(TNS server)”,并测试连接上oracle数据库正常
2、在sqlserver的DTS(导入和导出数据工具)进行
(1)选择数据源:
数据源:oracle in oracle9i
选择:用户/系统DSN:
点击新建 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号