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

VC ³ÌÐòÖÐÈçºÎÓÃADOÁ¬½ÓSQL Server 2005?

Ê×ÏÈ˵Ã÷Ò»µã£ºVC³ÌÐòÖÐÓÃADOÁ¬½ÓSQL Server 2005 ºÍÁ¬½Ó SQL Server 2000µÄÓï¾äºÍÁ¬½Ó×Ö·û´®ÊÇÍêÈ«Ò»ÑùµÄ£¬ÏÂÃæµÄ´úÂëÊÊÓÃÓÚÁ½¸öÊý¾Ý¿âµÄÁ¬½Ó¡£
ÁíÒ»µã˵Ã÷£ºÈç¹ûÄãÒÔÇ°°²×°¹ýSQL Server 2000£¬ºóÔÚûÓÐжÔصÄÇé¿öÏÂÓÖ°²×°ÁË2005£¬ÄÇôÄã֮ǰÔÚ2000ÖÐÉèÖõÄÓû§ÃûºÍÃÜÂëÔÚ2005Öлᱣ³Ö£¬¼´Ê¹Äã°²×°2005ʱδÉèÖÃÈκÎÓû§ÃûºÍÃÜÂë¡£
ÏÂÃæÊÇVC³ÌÐòÖÐÓÃADOÁ¬½ÓSQL ServerÊý¾Ý¿âµÄÒ»¸öÀý×Ó£º
£¨1£©´´½¨Ò»¸ö»ùÓÚ¶Ô»°¿òµÄ¹¤³Ì£¬¹¤³ÌÃûΪTest¡£
£¨2£©ÔÚStdAfx.hÖе¼ÈëADO¶¯Ì¬Á´½Ó¿â£¬´úÂëÈçÏ£º
        #import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace\
        rename("EOF","adoEOF")
£¨3£©ÔÚCTestApp::InitInstance()Öгõʼ»¯COM»·¾³£º
       ::CoInitialize(NULL);
       ×¢Ò⣬ÕâÌõÓï¾äÒ»¶¨Òª·ÅÔÚ“CTestDlg dlg;”ÕâÌõÓï¾äµÄÇ°Ã棬·ñÔòÔÚCTestDlgµÄº¯ÊýÖÐÁ¬½ÓÊý¾Ý¿â»áÒòÎÞ·¨´´½¨Á¬½ÓʵÀý¶øʧ    
       °Ü¡£
 £¨4£©ÔÚ¶Ô»°¿òµÄÍ·ÎļþÖÐÉùÃ÷ADOÖÇÄÜÖ¸Õë¡£
        _ConnectionPtr m_pConnection;  //Á¬½Ó¶ÔÏóÖ¸Õë
        _RecordsetPtr  m_pRecordset;     //¼Ç¼¼¯¶ÔÏóÖ¸Õë
 £¨5£©ÔÚCTestDlg::OnInitDialog()ÖÐÁ¬½ÓÊý¾Ý¿â£º
         try
        {
               m_pConnection.CreateInstance("ADODB.Connection");     //´´½¨Á¬½Ó¶ÔÏóʵÀý
              _bstr_t strConnect="Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=Query;
               Data  Source=127.0.0.1";           //Á¬½Ó×Ö·û´®£¬ÕâÀïQueryÊÇÊý¾Ý¿âÃû£¬127.0.0.1´ú±í±¾µØÖ÷»ú
 


Ïà¹ØÎĵµ£º

SQL ServerÓÅ»¯¶þ

1.Ó¦¾¡Á¿±ÜÃâÔÚ where ×Ó¾äÖжÔ×ֶνøÐÐ null ÖµÅжϣ¬·ñÔò½«µ¼ÖÂÒýÇæ·ÅÆúʹÓÃË÷Òý¶ø½øÐÐÈ«±íɨÃ裬È磺
select id from t where num is null
¿ÉÒÔÔÚnumÉÏÉèÖÃĬÈÏÖµ0£¬È·±£±íÖÐnumÁÐûÓÐnullÖµ£¬È»ºóÕâÑù²éѯ£º
select id from t where num=0
2.Ó¦¾¡Á¿±ÜÃâÔÚ where ×Ó¾äÖÐʹÓÃ!=»ò<>²Ù×÷·û£¬·ñÔò½«ÒýÇæ·ÅÆúÊ ......

Ò»¸öÏîÄ¿ÖÐÓõ½µÄ50¸öSQLÓï¾ä

ÕâÊÇCSDNÂÛ̳ÀïÃæµÄÒ»¸öÌû×Ó£¬×÷ÕßÊÇ°®Ð¾õÂÞ.ع»ª¡£¸Ð¾õ±È½ÏÈ«Ã棬¾ÍÕûÀíÏÂÀ´ÁË£¬Áô×÷ÒÔºó²Î¿¼±¸Óá£ÔÚ´Ë£¬Ôڴ˸Ðл±¾ÎĵÄ×÷Õß¡£
/*
±êÌ⣺һ¸öÏîÄ¿Éæ¼°µ½µÄ50¸öSqlÓï¾ä(ÕûÀí°æ)
×÷Õߣº°®Ð¾õÂÞ.ع»ª(Ê®°ËÄê·çÓ꣬ÊصñùɽѩÁ«»¨¿ª)
ʱ¼ä£º2010-05-10
µØµã£ºÖØÇ캽ÌìְҵѧԺ
˵Ã÷£ºÒÔÏÂÎåÊ®¸öÓï¾ä¶¼°´ÕÕ²âÊÔÊý¾Ý½øÐ ......

[SQL Server2008]MDX º¯Êý²Î¿¼ (MDX)

MDX º¯Êý²Î¿¼
SQL Server 2008 Áª»ú´ÔÊ飨2009 Äê 7 Ô£©
MDX º¯Êý²Î¿¼ (MDX)
Microsoft SQL Server Analysis Services ÔÊÐíÔÚ¶àά±í´ïʽ (MDX) Óï·¨ÖÐʹÓú¯Êý¡£º¯Êý¿ÉÒÔÔÚÈκÎÓÐЧµÄ MDX Óï¾äÖÐʹÓ㬲¢ÇÒ¾­³£ÓÃÓÚ²éѯ¡¢×Ô¶¨Òå»ã×ܶ¨ÒåÒÔ¼°ÆäËû¼ÆËã¡£ ±¾½Ú½éÉÜ Analysis Services ¸½´øµÄ MDX º¯Êý¡£
¿ÉÒÔʹÓÃÏÂÃæÕâÐ ......

SQL 2005 CHECKÔ¼ÊøºÍ¹æÔòÇø±ð


Ò»¡¢Ô¼Êø   
      Ô¼Êø¶¨Òå¹ØÓÚÁÐÖÐÔÊÐíÖµµÄ¹æÔò£¬ÊÇÇ¿ÖÆÍêÕûÐԵıê×¼»úÖÆ¡£
      Ê¹ÓÃÔ¼ÊøÓÅÏÈÓÚʹÓô¥·¢Æ÷¡¢¹æÔòºÍĬÈÏÖµ¡£²éѯÓÅ»¯Æ÷ҲʹÓÃÔ¼Êø¶¨ÒåÉú³É¸ßÐÔÄܵIJéѯִÐмƻ®¡£SQL Server 2005Ö§³ÖÎåÀàÔ¼Êø£º  
      1. NOT ......

sql server Ë÷Òý¹ÜÀíÁù´óÌúÂÉ


ÎÄÕÂÀ´Ô´£ºIT¹¤³Ì¼¼ÊõÍø http://www.systhinker.com/?viewnews-11609
      ÌúÂÉÒ»£ºÌìÏÂûÓÐÃâ·ÑµÄÎç²Í£¬Ê¹ÓÃË÷ÒýÊÇÐèÒª¸¶³ö´ú¼ÛµÄ¡£
 
¡¡¡¡Ë÷ÒýµÄÓŵãÓÐÄ¿¹²¶Ã£¬µ«ÊÇ£¬È´ºÜÉÙÓÐÈ˹ØÐĹý²ÉÓÃË÷ÒýËùÐèÒª¸¶³öµÄ³É±¾¡£ÈôÊý¾Ý¿â¹ÜÀíÔ±Äܹ»¶ÔË÷ÒýËùÐèÒª¸¶³öµÄ´ú¼ÛÓÐÒ»¸ö³ä·ÖµÄÈÏʶ£¬Ò²¾Í²»» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ