C# Á¬½ÓSQLÊý¾Ý¿â³£ÓõÄÁ¬½Ó×Ö·û´®¸ÃÈçºÎд£¿
£¨1£©string ConnString = "server=localhost;integrated security=sspi;database=pubs;";
£¨2£©string strConnection="user uid=sa;pwd=123456;Database=test;Server=test;Connect Timeout=30";
£¨1£©£¨2£©ÓÐÇø±ðÂð£¿
SqlConnection objConnection=new SqlConnection(strConnection);
Èç¹ûÁ¬½Ó202.196.35.3ÉϵÄSQLserverÊý¾Ý¿â
ÊÇ·ñServer=202.196.35.3¼´¿É£¿
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
http://www.connectionstrings.com/
Â¥Ö÷²Î¿¼´ËÍøÕ¾°É¡£
ʲôÁ¬½Ó¶¼ÓÐÁË
當È»ÓÐ區別ѽ£¬Server¿ÉÒÔÊÇIPµØÖ·¡£
µÚÒ»種£ººÃÏñÊDzÉÓÃWindows認證ģʽ¡£µÚ¶þ種£º²ÉÓÃSQL Server認識ģʽ£¬ËùÒÔ¼ÓÈëSQL ServerµÄÓÃ戶與ÃÜ碼¡£
Ïà¹ØÎÊ´ð£º
....½Óµ½Ò»¸öС³ÌÐò..¹¤×÷ÔÀ´´ó¸ÅÊÇÕâÑùµÄ...ǰ̨ÊÇWEB·þÎñÆ÷.¼Ü¹¹¾ÍÊÇASP+SQL..ǰ̨ÓÉASPÏòSQLÌí¼Ó·þÎñÀà±ð(±íµ¥).È»ºóÓÖºǫ́³ÌÐò¶ÁÈ¡±íµ¥..Ҫʵʱ¶ÁÈ¡..È»ºóÏÔʾÔÚ·þÎñÆ÷ÉÏÃæ..´ÓÀíÂÛÉÏÃæÄÜÐÐͨ²»?Èç¹û¿ÉÒÔ..ºǫ́ ......
´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e
ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......
СµÜÊǸöÐÂÊÖ ÏÖÔÚÓиöÎÊÌâÒ»Ö±²»Äܽâ¾ö
ÀýÈç
procedure produce_proc
@p001 nvarchar(8000),
@p002 nvarchar(8000),
@p003 nvarchar(8000),
& ......
DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)
string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime ......
table1
Ãû³Æ Èë¿âÊý
CT»ú 3
CT»ú 5
X¹â»ú 4 ......