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

Ïê½âAsp.Net SqlÊý¾Ý¿âÁ¬½Ó×Ö·û´®


1.Á¬½ÓÊý¾Ý¿âÎļþ
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=true" />
SqlConnectionStringBuilderʵÀý»¯Ê±£¬ÒªÓõ½connectionString£¬È磺SqlConnectionStringBuild builder = new SqlConnectionStringBuild(connectionString)¡£
   Ò»¡¢Data Source
SqlConnectionStringBuilderµÄDataSourceÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄData Source£¬“Data Source”¿ÉÒÔÓÉÏÂÁÐ×Ö·û´®´úÌ棺“server”£¬“address”£¬“addr”ºÍ“network address”¡£
Data Source=.\SQLExpressÒ²¿ÉÒÔд³ÉÕâÑùData Source=(local)\SQLExpress¡£
   ¶þ¡¢Integrated Security
SqlConnectionStringBuilderµÄIntegratedSecurityÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄIntegrated Security£¬“Integrated Security”¿ÉÒÔд³É“trusted_connection”£¬Îªtrueʱ£¬Ê¹Óõ±Ç°µÄ Windows ÕÊ»§Æ¾¾Ý½øÐÐÉí·ÝÑéÖ¤£¬Îªfalseʱ£¬ÐèÒªÔÚÁ¬½ÓÖÐÖ¸¶¨Óû§ ID ºÍÃÜÂë¡£
   Èý¡¢AttachDBFilename
SqlConnectionStringBuilderµÄAttachDBFilenameÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄAttachDBFilename£¬“AttachDBFilename”¿ÉÒÔд³É“extended properties”£¬“initial file name”¡£AttachDbFileNameÊôÐÔÖ¸¶¨Á¬½Ó´ò¿ªµÄʱºò¶¯Ì¬¸½¼Óµ½·þÎñÆ÷ÉϵÄÊý¾Ý¿âÎļþµÄλÖá£Õâ¸öÊôÐÔ¿ÉÒÔ½ÓÊÜÊý¾Ý¿âµÄÍêÕû·¾¶ºÍÏà¶Ô·¾¶£¨ÀýÈçʹÓÃ|DataDirectory|Óï·¨£©£¬ÔÚÔËÐÐʱÕâ¸ö·¾¶»á±»Ó¦ÓóÌÐòµÄApp_DataĿ¼Ëù´úÌæ¡£
ÓÐһƪÎÄÕ£¬×¨ÃŽâÊÍDataDirectoryÊÇʲô¡£
   ËÄ¡¢User Instance
SqlConnectionStringBuilderµÄUserInstanceÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄUser Instance ,¸ÃֵָʾÊÇ·ñ½«Á¬½Ó´ÓĬÈ쵀 SQL Server Express ʵÀýÖض¨Ïòµ½ÔÚµ÷Ó÷½ÕÊ»§Ö®ÏÂÔËÐв¢ÇÒÔÚÔËÐÐʱÆô¶¯µÄʵÀý¡£UserInstance=true£¬ÔÚÕâÖÖÇé¿öÏ£¬SQLServerExpressΪÁË°ÑÊý¾Ý¿â¸½¼Óµ½ÐµÄʵÀý£¬½¨Á¢Ò»¸öеĽø³Ì£¬ÔÚ´ò¿ªÁ¬½ÓµÄÓû§Éí·ÝÏÂÔËÐС£ÔÚASP.NETÓ¦ÓóÌÐòÖУ¬Õâ¸öÓû§ÊDZ¾µØµÄASPNETÕʺŻòĬÈϵÄNetworkService£¬ÕâÒÀÀµÓÚ²Ù×÷ϵͳ¡£ÎªÁË°²È«µØ¸½¼Ó·Çϵͳ¹ÜÀíÔ±Õʺţ¨ÀýÈçASP.NETÕʺţ©ÌṩµÄÊý¾Ý¿âÎļþ£¬½¨Á¢Ò»¸ö¶ÀÁ¢µÄSQLServerÓû§ÊµÀýÊDZØÒªµÄ¡£
¸½Â


Ïà¹ØÎĵµ£º

asp.net Ï嵀 TreeView ÖеÄÐéÏ߶϶ÏÐøÐø

 ÔÚIE6ÖÐÕý³££¬µ«ÊÇÔÚIE7Öж϶ÏÐøÐø¡£
Õâ¸öÎÊÌâ¿´ÉÏÈ¥Ó¦¸ÃÊÇIE7ºÍIE6¶ÔstyleÄÚÈݳÊÏÖ²»Í¬µ¼Öµġ£
ÎÊÌâÔ­Òò£º´ò¿ªTreeviewËùÔÚÒ³ÃæµÄsource code£¨ÔÚIE7ÀïÃæÑ¡ÔñView Source£©£¬´Ëʱ¿ÉÒÔ¿´µ½Treeview³ÊÏÖµ½¿Í»§¶ËºóµÄHTML´úÂ룬ÔÚÕâÀï¿ÉÒÔ¿´µ½TreeView³ÊÏÖµÄHTMLÀïÃæµÚÒ»¸öDivµÄStyleÊôÐÔÖÐÓÐÒ»¸öheight:1px¡£
ÎÊ ......

asp.netÖвÙ×÷ExcelÈ«¼¯

Ê×ÏÈÔÚ Web.Config ÖÐÌí¼ÓÄ£ÄâÕʺŠ
<identity impersonate="true" userName="administrator"password="password" />
 
         Æä´Î ÒªÌí¼Ó EXCEL com ×é¼þ¡£Èç¹ûÊÇEXCEL2003,ÔòÌí¼Ó EXcel library 11.0 °æ±¾¡£ÎÒ°ÑÓõ½µÄÒýÓÃÍ·ÎļþÁоÙÈçÏ£º
 
&nbs ......

ASP.NET 2.0 ±¾µØ»¯1

  ÖÚËùÖÜÖªASP.NET 2.0Àï¶Ô±¾µØ»¯£¨Localization£©×öÁ˺ܶ๤×÷£¬´ó´ó¼ò»¯ÁË¿ª·¢¹ý³Ì¡£½ñÌìÖÕÓÚÄܳé³öʱ¼äÑо¿Ò»ÏÂÕâ¸ö¼¼ÊõÁË£¬×ÊÁϺܶ࣬µ«´ó¶à´ø×ÅÒ»¹ÉÒ§ÎĽÀ×ֵķ­ÒëζµÀ£¬So......×Ô¼ºÐ´Ò»Æª¡£
1.ʹÓù¤¾ß×Ô¶¯Éú³É±¾µØ»¯×ÊÔ´£¨LocalResources£©
2.Ô­À´Localizable AttributePropertyÊÇÕâô»ØÊÂѽ
3.ÊÖ¹¤Ìí¼Ó±¾µ ......

asp.netÖвÙ×÷ExcelÈ«¼¯[1]

         Ê×ÏÈÔÚ Web.Config ÖÐÌí¼ÓÄ£ÄâÕʺÅ
 
<identity impersonate="true" userName="administrator"password="password" />
 
         Æä´Î ÒªÌí¼Ó EXCEL com ×é¼þ¡£Èç¹ûÊÇEXCEL2003,ÔòÌí¼Ó EXcel library 11.0 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ