Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

×î¼òµ¥µÄ×î¸ßЧµÄ¹ýÂËSQL½Å±¾·À×¢Èë

.errInfo
{
    border:solid 1px #d00;
    background:#F7F0F7;
}
1.URLµØÖ··À×¢È룺
//¹ýÂËURL·Ç·¨SQL×Ö·û
var sUrl=location.search.toLowerCase();
var sQuery=sUrl.substring(sUrl.indexOf("=")+1);
re=/select|update|delete|truncate|join|union|exec|insert|drop|count|’|"|=|;|>|<|%/i;
if(re.test(sQuery))
{
    alert("ÇëÎðÊäÈë·Ç·¨×Ö·û");
    location.href=sUrl.replace(sQuery,"");
}
 
2.ÊäÈëÎı¾¿ò·À×¢È룺
ÒýÈëÒÔÏÂjs
//·ÀÖ¹SQL×¢Èë
function AntiSqlValid(oField )
{
    re= /select|update|delete|exec|count|’|"|=|;|>|<|%/i;
    if ( re.test(oField.value) )
    {
    //alert("ÇëÄú²»ÒªÔÚ²ÎÊýÖÐÊäÈëÌØÊâ×Ö·ûºÍSQL¹Ø¼ü×Ö£¡"); //×¢ÒâÖÐÎÄÂÒÂë
    oField.value = ”;
    oField.className="errInfo";
    oField.focus();
    return false;
    }
 
ÔÚÐèÒª·À×¢ÈëµÄÊäÈëÎı¾¿òÌí¼ÓÈçÏ·½·¨
            txtName.Attributes.Add("onblur", "AntiSqlValid(this)");//·ÀÖ¹Sql½Å±¾×¢Èë


Ïà¹ØÎĵµ£º

SQL Server 2005 Driver for JDBC


Load the SQL Server 2005 Driver for JDBC before you load the SQL Server 2000 Driver for JDBC. To do this, use the DriverManager class as in the following code example.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version
Class.forName("com.microsoft.jdbc.sqlserver.SQLSe ......

SQLÃüÁî´óÈ«

[code=SQL][/code]
--Óï ¾ä ¹¦ ÄÜ 
--Êý¾Ý²Ù×÷ 
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁР
INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐР
DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐР
UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå 
CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í 
DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ ......

Asp.netÓëSQLÒ»Æð´ò°ü²¿Êð°²×°


Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵쬶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......

SQL ServerÈ«ÎÄË÷ÒýµÄ¸öÈË×ܽá(ÉÏ) ¹ØÓÚÖÐÎÄ·Ö´Ê


SQL ServerÈ«ÎÄË÷ÒýµÄ¸öÈË×ܽá(ÉÏ) -¹ØÓÚÖÐÎÄ·Ö´Ê
(2005-11-14 04:29:44)
×ªÔØ
 
·ÖÀࣺÉî¶ÈÑо¿
´ó¼Ò¶¼ÖªµÀLIKE²éѯºÜÂý£¬È«ÎÄË÷Òý¾ÍÊÇÊÂÏÈ×öºÃÏà¹ØµÄË÷Òý£¬±íʾÄĸöÖ÷Ìâ´Ê¿ÉÒÔÔÚÄÄЩ¼Ç¼ÀïÕÒµ½£¬ÉõÖÁÊÂÏȼÆËãºÃRANK£¬¼ìË÷ʱ¿ÉÒÔ°ÑÏà¹Ø¶È¸ßµÄÏÈÁгöÀ´£¬Õâ¿ÉÒÔ´ó´óÌá¸ß¼ìË÷µÄËÙ¶È¡£
´ò¸ö±È·½£¬ÄãÓÐ ......

SQLÖÐcase when thenµÄʹÓÃʵÀý

¼ÙÉèÏÖÔÚNews±íÓÐÒÔÏÂ×Ö¶Î
News_Id,News_Title,News_IsSetTop,News_SetTopTime
ÆäÖÐNews_IsSetTop(char(1))ÊÇ“ÊÇ·ñÖö¥”µÄº¬Ò壻News_SetTopTime(DateTime)ÊÇÖö¥Ê±¼ä£»
ÏÖÔÚҪʵÏÖ£ºÈç¹ûNews_IsSetTopΪ"1"ʱ £¬ORDER BY News_IsSetTop DESC,News_Id DESC£»News_IsSetTopΪ"0"ʱ£¬ORDER BY News_ID DESC ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ