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

ASP.NETÔ¶³Ì±¸·Ý»Ö¸´SQL ServerÊý¾Ý¿â

///<summary>
      ///±¸·ÝÊý¾Ý¿âµ½±¾µØ´ÅÅÌ
      ///</summary>
    public bool BackUp(string BackUpFile)
    {
        try
        {
          //µÚÒ»²½£ºÔÚ·þÎñÆ÷ÉÏ´´½¨ÁÙʱÎļþ¼Ð
          ExecuteSql(@"master..xp_cmdshell 'md C:\temp'");
          ExecuteSql(@"master..xp_cmdshell 'del C:\temp\*.* /q'");
          //µÚ¶þ²½£º±¸·ÝÊý¾Ý¿âµ½·þÎñÆ÷Ŀ¼
          ExecuteSql(@"backup database " + DataBaseName() + @" to disk='C:\temp\HSSY'");
          //µÚÈý²½£º¹²Ïí·þÎñÆ÷µÄ±¸·ÝĿ¼
          ExecuteSql(@"master..xp_cmdshell 'net share SQLDATABACK=C:\temp'");
          //µÚËIJ½£º¸´ÖÆ·þÎñÆ÷Éϵı¸·ÝÎļþµ½±¾µØ
          File.Copy(@"\\" + ServerIP() + @"\SQLDATABACK\HSSY", BackUpFile,true);
          
          return true;
        }
        catch (System.Data.SqlClient.SqlException E)
        {
          throw new Exception(E.Message);
        }
      


Ïà¹ØÎĵµ£º

dz̸ASP.net°²È«±à³Ì

ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔǰµÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕß¶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......

sql ²éÑ¯ÖØ¸´¼Ç¼2


========µÚһƪ=========
ÔÚÒ»ÕűíÖÐij¸ö×Ö¶ÎÏÂÃæÓÐÖØ¸´¼Ç¼£¬Óкܶ෽·¨£¬µ«ÊÇÓÐÒ»¸ö·½·¨£¬ÊDZȽϸßЧµÄ£¬ÈçÏÂÓï¾ä£º
select data_guid from adam_entity_datas a where a.rowid > (select min(b.rowid) from adam_entity_datas b where b.data_guid = a.data_guid)
Èç¹û±íÖÐÓдóÁ¿Êý¾Ý£¬µ«ÊÇÖØ¸´Êý¾Ý±È½ÏÉÙ£¬ÄÇô ......

oracleÖÐʵÏֵݹé²éѯµÄSQL£¨connect by prior£©

    ǰ¶Îʱ¼ä×öÁËÒ»¸öÐéÄâ×éÖ¯µÄ´´½¨¡£Õâ¸öÐéÄâ×éÖ¯µÄ´´½¨ÊÇ´ÓÏÖÓеÄ×éÖ¯ÖжÁÈ¡Êý¾ÝÈ»ºó½øÐзÖÎö±£´æµ½ÐéÄâ×éÖ¯±íÖС£±£´æÖ®ºóдÈÕÖ¾·½±ãͬ²½µ½ÆäËüϵͳÖС£¹«Ë¾Ê¹ÓõÄÖ÷Òª¼¼ÊõÊÇSSH¡£ÓÉÓÚÊÇÐÂÈËûÓÐʲô¾­Ñ飬¼Ó֮ʱ¼ä±È½Ï½ôÆÈ£¬×îºóʹÓÃÒ»°ãµÄÂß¼­Ë¼Ïëͨ¹ýµÝ¹éÔÚhibernateÏÂ˳Àû´´½¨ÁË¡£¿ÉÊÇ´ÓÏÖÓеÄ×éÖ¯Ö ......

Microsoft SQL Server ¹ÜÀí £¨³£ÓùÜÀí¼°Î¬»¤ÃüÁ

 --²éѯµ±Ç°Á¬½ÓµÄʵÀýÃû
select @@servername--²ì¿´ÈκÎÊý¾Ý¿âÊôÐÔ
sp_helpdb master
--ÉèÖõ¥Óû§Ä£Ê½£¬Í¬Ê±Á¢¼´¶Ï¿ªËùÓÐÓû§
alter database Northwind set single_user with rollback immediate--»Ö¸´Õý³£
alter database Northwind set multi_user
--²ì¿´Êý¾Ý¿âÊôÐÔ
sp_helpdb--²ì¿´Êý¾Ý¿â»Ö¸´Ä£Ê½
selec ......

Ñ­»·ÎªTextBox¸³Öµ (asp.net C#)

 ×¢Òâ:
ÔÚʹÓÃFindControlʱ,Ò»¶¨ÒªÔÚ×îÌù½ü²éÕÒ¶ÔÏóµÄÍâ±ß¼ÓÉϸöÈÝÆ÷,Èç¹ûÄãÖ±½ÓÓÃthis.FindControl,»òPage.FindControlÄÇô¾Í»á¾­³£³öÏÖ佫¶ÔÏóÉèÖõ½ÊµÀý
µÄ´íÎó,ËùÒÔ×îºÃ¼ÓÒ»¸öÈÝÆ÷,ÄÇôÕâÀï¼ÓµÄDIV¾ÍÊÇÒ»¸öÈÝÆ÷,ΪÁËÈÃFindControlÔÚIDΪ"TextBoxs"µÄDIVÄÚÈ¥ÕÒÃûΪcom1,com2,com3µÄTextBOx;
<div ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ