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

SQL Server 2005 ³öÏÖµ½Ö÷»ú µÄ TCP/IP Á¬½Óʧ°Ü

localhost...²»ÄÜ´ò¿ªµ½Ö÷»úµÄÁ¬½Ó£¬ÔÚ¶Ë¿Ú 1433: Á¬½Óʧ°Ü
Æô¶¯tcp/ipÁ¬½ÓµÄ·½·¨£º
´ò¿ª
\Microsoft SQL Server 2005\ÅäÖù¤¾ß\Ŀ¼ÏµÄSQL Server Configuration
Manager£¬Ñ¡ÔñmssqlserverЭÒé,
È»ºóÓұߴ°¿ÚÓиötcp/ipЭÒ飬ÉèÖÃip/allĬÈ϶˿ÚΪ1433£¬È»ºóÆô¶¯Ëü£¬ÖØÆôsqlserver·þÎñ¡£
ÎÊÌâ½â¾ö
ÕâʱÔÚÃüÁîÐÐÊäÈ룺telnet localhost 1433¾Í²»»áÔÙ±¨´íÁË£¬´°¿ÚÏÔʾΪһƬºÚ£¬¼´ÎªÕý³£


Ïà¹ØÎĵµ£º

SQL²éѯÖظ´¼Ç¼

SQL²éѯÖظ´¼Ç¼
http://m.cnblogs.com/15628/1534873.html
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
[ͼƬ]select * from people
[ͼƬ]where peopleId in (select   peopleId  from   people  group  by   peopleId  ......

»¹Ô­SQLʧ°Ü

Êý¾Ý¿âÖ´ÐÐexec sp_renamedb 'oldname','newname'Óï¾ä£¬ÖØÃüÃûºó£¬½«Êý¾Ý¿â±¸·ÝÎļþ»¹Ô­Ê±£¬»á³öÏÖ´íÎó£¬Èçͼ
ÒòÊýÊý¾ÝÎļþÓëÊý¾Ý¿âÃû³Æ²»Ò»Ö¡£
½â¾ö·½·¨£º¿ÉÒÔÕÒµ½Êý¾ÝÎļþµÄÃû³Æ£¬½«Êý¾Ý¿â»¹Ô­Ãû³Æ¸úÊý¾Ý¿âÎļþÒ»ÖµÄÃû³Æ£¬´Ëʱ»¹Ô­³É¹¦ºó£¬ÔÙÐÞ¸ÄÊý¾Ý¿âµÄÃû³Æ¡£
×¢£ºÊý¾Ý¿âÖØÃüʱ£¬Ð轫SQL·þÎñÆ÷Í£Ö¹£¬ÖØÃüÃûºóÔÙÖØÐ ......

vb.net Á¬½ÓSQLÊý¾Ý¿â

     'ÔÚÒýÓÃÀïÌí¼ÓADODB
Public vscn As ADODB.Connection
Public SQLString As String
SQLString = "Provider=SQLOLEDB.1;Password=ÃÜÂë;Persist Security Info=True;User ID=ÓÃ" & _
"»§;Initial Catalog=Êý¾Ý¿âÃû;Data Source=·þÎñÆ÷Ãû"
         ......

sql µÄËæ»úº¯ÊýnewID()ºÍRAND()

sql serverµÄËæ»úº¯ÊýnewID()ºÍRAND()¡¡¡¡
¡¡¡¡SELECT * from Northwind..Orders ORDER BY NEWID()
¡¡¡¡--Ëæ»úÅÅÐò
¡¡¡¡SELECT TOP 10 * from Northwind..Orders ORDER BY NEWID()
¡¡¡¡--´ÓOrders±íÖÐËæ»úÈ¡³ö10Ìõ¼Ç¼¡¡¡¡
¡¡¡¡Ê¾Àý¡¡¡¡
¡¡¡¡A.¶Ô±äÁ¿Ê¹Óà NEWID º¯Êý
¡¡¡¡ÒÔÏÂʾÀýʹÓà NEWID() ¶ÔÉùÃ÷Ϊ uniq ......

vb.net SQLÊý¾Ý¿â²Ù×÷£¨¶ÁÈ¡¡¢Ð޸ġ¢É¾³ý£©

        Dim rs As ADODB.Recordset
Dim sqlstr As String
 
'²éѯ
        sqlstr = "select * from ±íÃû where ×Ö¶ÎÃû = '" & ²éѯµÄÄÚÈÝ & "'"
        rs = VScn.Execute("" & SqlSt ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ