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

Excelµ¼ÈëSQL SERVERÖÐ

--Excelµ¼ÈëSQL SERVERÖÐ
--±í½á¹¹²»´æÔÚ¿ÉÒÔʹÓÃ
--ÆôÓÃAd Hoc Distributed Queries£º
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
select * into serv_user_bak1 from
OpenRowSet('microsoft.jet.oledb.4.0','Excel 8.0;HDR=yes;dat ......

hibernate ¶àÌõ¼þ×éºÏ²éѯ Ö® sql Æ´½Ó

  public static void main(String[] args) {
      
       Session session = null;
       Transaction tx = null;
       List list = null;
     &nb ......

Sql ServerÖÐʹÓÃnewid()Ëæ»úº¯ÊýÈ¡³öÊý¾Ý

ÕâÖÖÓ÷¨ÏàÐÅÔÚÍøÕ¾Öо­³£Ê¹Óã¬ÈçÒªÔÚ±íÖÐËæ»úÈ¡³ö10Ìõ¼Ç¼£¬Èç¹ûʹÓñà³ÌÓïÑÔ½øÐÐÔËËãµÄ»°»áºÜÂé·³¶øÇÒЧÂʵÍÏ¡£ÔÚSql ServerÖÐ×Ô´øÁËrandom()º¯ÊýÓÃÓÚÉú³ÉËæ»úÊý£¬ÆäʵËü»¹×Ô´øÁËÁíÍâÒ»¸öËæ»úº¯Êýnewid();newid()ÔÚɨÃèÿÌõ¼Ç¼ʱ¶¼»áÉú³ÉÒ»¸öËæ»úµÄÖµ£º
Ö´ÐÐselect newid()£»ÔËÐнá¹û
¿ÉÒÔ¿´µ½Õâ²¢²»ÊÇÒ»¸öËæ»úµÄÊý× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ