Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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();


Ïà¹ØÎĵµ£º

ÖµµÃÊղصÄMicrosoft SQL ServerϵÄSQLÓï¾ä

SQLÓï¾äÏÈǰдµÄʱºò£¬ºÜÈÝÒ×°ÑһЩÌØÊâµÄÓ÷¨Íü¼Ç£¬ÎÒÌØ´ËÕûÀíÁËÒ»ÏÂSQLÓï¾ä²Ù×÷¡£
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssq ......

SQL SERVER´æ´¢¹ý³Ì½âÃÜ·½·¨

create PROCEDURE sp_decrypt(@objectName varchar(50))
AS
begin
set nocount on
--CSDN£ºj9988 copyright:2004.01.05
--V3.1
--Æƽâ×Ö½Ú²»ÊÜÏÞÖÆ£¬ÊÊÓÃÓÚSQLSERVER2000´æ´¢¹ý³Ì£¬º¯Êý£¬ÊÓͼ£¬´¥·¢Æ÷
--·¢ÏÖÓÐ´í£¬ÇëE_MAIL£ºCSDNj9988@tom.com
begin tran
declare @objectname1 varchar(100),@orgvarbin varbina ......

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 ³£ÓÃÓï¾ä

(1)Êý¾Ý¼Ç¼ɸѡ£º
sql="select*fromÊý¾Ý±íwhere×Ö¶ÎÃû=×Ö¶ÎÖµorderby×Ö¶ÎÃû[desc]"
sql="select*fromÊý¾Ý±íwhere×Ö¶ÎÃûlike'%×Ö¶ÎÖµ%'orderby×Ö¶ÎÃû[desc]"
sql="selecttop10*fromÊý¾Ý±íwhere×Ö¶ÎÃûorderby×Ö¶ÎÃû[desc]"
sql="select*fromÊý¾Ý±íwhere×Ö¶ÎÃûin('Öµ1','Öµ2','Öµ3')"
sql="select*fromÊý¾Ý±íwhere× ......

ÔõÑù½«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ºÅ