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

ASP.NET·ÀÖ¹SQL×¢È뺯Êý

ASP.NET·ÀÖ¹SQL×¢È뺯Êý:
using System;
using System.Text.RegularExpressions;
using System.Web;
namespace FSqlKeyWord
......{
    /**//**//**//// <summary>
    /// SqlKey µÄժҪ˵Ã÷¡£
    /// </summary>
    public class SqlKey
    ......{
        private HttpRequest request;
        private const string StrKeyWord = @"select|insert|delete|from|count(|drop table|update|truncate|asc(|mid(|char(|xp_cmdshell|exec master|netlocalgroup administrators|:|net user|""|or|and";
        private const string StrRegex = @"[-|;|,|/|(|)|[|]|}|{|%|@|*|!|']";
        public SqlKey(System.Web.HttpRequest _request)
        ......{
            //
            // TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼­
            //
            this.request = _request;
        }
        /**//**//**//// <summary>
        /// Ö»¶ÁÊôÐÔ SQL¹Ø¼ü×Ö
        /// </summary>
        public static string KeyWord
        ......{
            get
            ......{
                return StrKeyWord;
            }
        }
  &nbs


Ïà¹ØÎĵµ£º

SQL2005ºÍ(Excel |access)Ö®¼äµÄÊý¾Ýµ¼Èëµ¼³ö


Sql´úÂë
--²ÉÓÃSQLÓï¾äʵÏÖsql2005ºÍExcel Êý¾ÝÖ®¼äµÄÊý¾Ýµ¼Èëµ¼³ö£¬ÔÚÍøÉÏÕÒÀ´Ò»--Ï£¬ÊµÏÖ·½·¨ÊÇÕâÑùµÄ£º    
  
  
--Excel---->SQL2005  µ¼È룺    
  
  
select * into useinfo from O ......

ASP.NETµÄACCESSÊý¾Ý¿â²Ù×÷Àà

//private string datapatch = ConfigurationSettings.AppSettings["acessconn"];//Êý¾Ý¿âµØÖ· 
private string datapatch = "db/global.asa";//Êý¾Ý¿âµØÖ· 
/// 
/// È¡µÃdataset 
// 
/// ²éѯÓï¾ä 
/// 
public DataSet GetDataSet(string Commandtext) 
{&nbs ......

(ת)SQL ²éÕÒÖظ´¼Ç¼

±ístuinfo£¬ÓÐÈý¸ö×Ö¶Îrecno(×ÔÔö),stuid,stuname
½¨¸Ã±íµÄSqlÓï¾äÈçÏ£º
CREATE TABLE [StuInfo] (
[recno] [int] IDENTITY (1, 1) NOT NULL ,
[stuid] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[stuname] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]
GO
1.--²éijһÁ ......

ASP.NETµÄĸ°æ֪ʶժҪ


ĸ°æÒ³Ãæ
-- н¨Ò»Ä¸°æÒ³Ãæ
-- ÔÚÊʵ±Î»ÖüÓÈë´úÂ룺
<asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
...ÕâÖ®¼äµÄÄÚÈÝÈç¹ûûÓÐContentÄÚÈÝ£¬½«»áµÃµ½ÏÔʾ£»
...Èç¹ûÓÐContentÄÚÈÝ£¬½«»á±»ContentÄÚÈÝÌæ»»µô
</asp:ContentPlaceHolder>
ContentÒ³Ãæ
-- н¨Ò»WEB´°Ìå
-- ÔÚÊʵ± ......

ASP.netÖÐTimerºÍWebServiceµÄʹÓÃ

 Ê¾ÀýÒ»
ÔÚGlobal.asax.csÎļþÖУº 
 protected void Application_Start(Object sender, EventArgs e)
      {
               System.Timers.Timer timer1 = new System.Timers.Timer();
 &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ