c# SQLÊý¾Ý¿âÔ¶³ÌÁ¬½Ó¼°ÅäÖ÷½·¨
Ò»£ºC# Á¬½ÓSQLÊý¾Ý¿â
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
1£ºIntegrated Security²ÎÊý
µ±ÉèÖÃIntegrated SecurityΪ True µÄʱºò£¬Á¬½ÓÓï¾äÇ°ÃæµÄ UserID, PW ÊDz»Æð×÷Óõģ¬¼´²ÉÓÃwindowsÉí·ÝÑé֤ģʽ¡£
Ö»ÓÐÉèÖÃΪ False »òÊ¡ÂÔ¸ÃÏîµÄʱºò£¬²Å°´ÕÕ UserID, PW À´Á¬½Ó¡£
Integrated Security »¹¿ÉÒÔÉèÖÃΪ£ºsspi £¬Ï൱ÓÚ True£¬½¨ÒéÓÃÕâ¸ö´úÌæ True¡£
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=true;
Data Source=myServerAddress;Initial Catalog=myDataBase;;User ID=myUsername;Password=myPasswordIntegrated Security=false;
2£º²ÎÊýTrusted_Connection
Trusted_Connection=true£¬½«Ê¹Óõ±Ç°µÄ Windows ÕÊ»§Æ¾¾Ý½øÐÐÉí·ÝÑéÖ¤
Trusted_Connection=false;½«²»²ÉÓÃÐÅÈÎÁ¬½Ó·½Ê½(Ò²¼´²»²ÉÓÃWindowsÑéÖ¤·½Ê½)£¬¶ø¸ÄÓÉSQL Server 2000ÑéÖ¤·½Ê½
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=false;
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
3£ºInitial CatalogÊÇÄãÒªÁ¬½ÓµÄÊý¾Ý¿âµÄÃû×Ö
4£ºWINCEÁ¬½Ó
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;
¶þ£º¿ÉÒÔÀûÓÃSqlConnectionStringBuilder£¬ÕâÑù²»±ØÈ¥¼
Ïà¹ØÎĵµ£º
¸ÐлÌ῵µÂÂÞ¼ÓµÄͶµÝ
¾ÍÏñµ±Ä겨ʿ¶ÙµÄ°®¹úÕßΪ·´¿¹Ó¢¹úÖØË°µÄÐж¯Ò»Ñù£¬NoSQLµÄÖ§³ÖÕßÃÇ´Ó¸÷µØÓ¿À´£¬·ÖÏíËûÃÇÈçºÎÍÆ·»ºÂý¶ø°º¹óµÄ¹ØϵÊý¾Ý¿âµÄ±©Õþ£¬ÔõÑùʹÓøüÓÐЧºÍ¸ü±ãÒ˵ķ½·¨À´¹ÜÀíÊý¾Ý£¬ËûÃÇ¿ªÊ¼¶ÔSQL˵²»£¡NoSQL×éÖ¯ÉϸöÔÂÔھɽðɽµÄÐж¯ÈÃÈËÎŵ½ÁËÊý¾Ý¿â¸ïÃüµÄζµÀ£¬ºÃÏñÒ»¸öÏÖ´úITÒµ°æµÄ²¨ ......
Òѳɹ¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó£¬µ«ÊÇÔڵǼǰµÄÎÕÊÖÆڼ䷢Éú´íÎóµÄ´¦Àí·½·¨
ÔÚÓÃSQL SERVER Óû§µÇ½SQL SERVER 2005ʱ£¬µ¯³öÒ»¸ö¶Ô»°¿ò£¬Ìáʾ" Òѳɹ¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó£¬µ«ÊÇÔڵǼǰµÄÎÕÊÖÆڼ䷢Éú´íÎó",²éÕÒÁËÒ»ÏÂÔÒò£¬ÔÀ´ÊÇSQL SERVER 2005ʱ½ûÓÃTCP/IPµÇ½ÁË£¬´ò¿ªSQL SERVER 2005²Ë ......
ÔÎÄ£ºhttp://www.cnblogs.com/whitetiger/archive/2007/03/27/689620.html
ÔÚBETA2ÖУ¬¡£NETÌṩÁËÒÔϵÄNAMESPACE£º
System.Data Namespace
System.Data.OleDb £¨ºÍBETA1ÖÐÒѾ²»Í¬ÁË£¬ËùÒÔÈç¹ûÄÃBETA1ÖеijÌÐòµ½BETA2ÖÐÀ´ÔËÐп϶¨²»¿ÉÒԵģ©
Èç¹ûÏë½²Çå³þÕâЩ¶«Î÷£¬ÎÒ²»ÈÏΪÊÇÎÒ¿ÉÒÔ×÷µ½µÄ£¬ËùÒÔÎÒÏëͨ¹ýһЩ¾ ......