C#Ò»´ÎÁ¬½ÓÊý¾Ý¿âÖ´ÐжàÌõsqlÓï¾ä(ÈýÖÖ·½·¨)
µÚÒ»ÖÖ·½·¨:
string str="server=.;uid=sa;pwd=111111;database=text_db";//Á¬½Ó×Ö·û´®
SqlConnection SCON = null;//Á¬½Ó¶ÔÏó
SqlCommand SCom=new SqlCommand();//ÃüÁî¶ÔÏó
SCON=new SqlConnection(str);
SCON.Open();
SCom.CommandText = "insert into cum(nm,age,sex,addr) values(‘”+name1+”’, ‘”+age1+”’, ‘”+sex1”’,’”+addr1+”’); insert into cum(nm,age,sex,addr) values(‘”+name1+”’, ‘”+age1+”’, ‘”+sex1”’,’”+addr1+”’)";
SCom.Connection = SCON;
SCom.CommandType = CommandType.Text;
int num = SCom.ExecuteNonQuery();
SCON.Close();
×¢Ò⣺Õâ¾ÍÊÇÓ÷ֺŸô¿ª£¬°Ñ¶àÌõsqlÓï¾äд³ÉÁËÒ»ÌõsqlÓï¾äÀ´Ö´ÐУ¬ÒòΪûÓÐÓòÎÊý£¬¿ÉÄÜÓÐsql×¢Èë·çÏÕ¡£
µÚ¶þÖÖ·½·¨:
string str="server=.;uid=sa;pwd=111111;database=text_db";//Á¬½Ó×Ö·û´®
SqlConnection SCON;
SqlCommand SCom1=new SqlCommand();//ÒªÖ´ÐÐsqlÓï¾äµÄµÚÒ»¸öÃüÁî¶ÔÏó
SqlCommand SCom2=new SqlCommand();//Ò
Ïà¹ØÎĵµ£º
´Ósql server 2000Éý¼¶µ½2005ÓÐ5ÖÖ·½·¨:
lÖ±½ÓÉý¼¶
lÀûÓÃdetach/attach¹¦ÄÜÒƶ¯sql server 2000µÄÊý¾Ý¿âµ½2005
lͨ¹ýbackup/restore¹¦ÄÜÀ´Ç¨ÒÆdb
lͨ¹ýsql server 2005µÄdatabase copy wizardÀ´¿½±´Êý¾Ý¿â
lͨ¹ýdtsµÄexport/import¹¤¾ßÀ´Ç¨ÒÆÊý¾Ýµ½sql server 2005
1.µÚÒ»ÖÖ·½·¨(Ö±½ÓÉý¼¶):
ÊʺÏ: Êý¾Ý ......
SQL Server 2005Éý¼¶µÄ10¸öÀíÓÉ
¡¡ºÜ¶àÈ˹ØÐĵĺ͵£ÐĵĶ¼ÊÇ SQL Server 2005 Ïà¶ÔËüµÄÇ°°æ±¾SQL Server 2000Ëù×öµÄÖØ´ó¸Ä½ø»òÐÂÔö¹¦ÄÜ¡£ÔÚÎÒÉý¼¶µ½SQL2005Ö®ºó£¬²»µÃ²»ËµµÄ£ºÄãÒ²ÖµµÃÓµÓС£(Ì×ÓÃÒ»¾ä¹ã¸æÓºÇºÇ)
¡¡¡¡ÎÒ×ܽáÁËһϸöÈËÈÏΪSQL Server 2005 ÖÐ×îÖµµÃÄãΪ֮Éý¼¶µÄ10 ¸öÀíÓÉ¡£ÎÞÂÛÄãÊÇÏëÁ˽â»òѧϰSQL Se ......
value·½·¨
µ±Äã²»Ïë½âÊÍÕû¸ö²éѯµÄ½á¹û¶øÖ»ÏëµÃµ½Ò»¸ö±êÁ¿ÖµÊ±£¬Õâ¸övalue·½·¨ÊǺÜÓаïÖúµÄ¡£Õâ¸övalue·½·¨ÓÃÓÚ²éѯXML²¢ÇÒ·µ»ØÒ»¸öÔ×ÓÖµ¡£
Õâ¸övalue·½·¨µÄÓï·¨ÈçÏ£º
value(XQuery£¬datatype)
½èÖúÓÚvalue·½·¨£¬Äã¿ÉÒÔ´ÓXMLÖеõ½µ¥¸ö±êÁ¿Öµ¡£Îª´Ë£¬Äã±ØÐëÖ¸¶¨XQueryÓï¾äºÍÄãÏëÒªËü·µ»ØµÄÊý¾ÝÀàÐÍ£¬²¢ÇÒÄã¿ÉÒÔ·µ»Ø³ ......
xmlÎļþ:
<?xml version="1.0" encoding="utf-8" ?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
......
ÈκÎÊÂÎñÎÞÂÛÆä¸ôÀ뼶±ðÈçºÎ£¬¶¼¾ßÓÐÔ×ÓÐÔ¡£Ô×ÓÐԺ͸ôÀ뼶±ðÊÇÁ½ÂëÊ¡£
¼Ù¶¨Ö»ÓÐÒ»ÖÖ×ÊÔ´Êý¾Ý±íÉϵēÐГ¿ÉÒÔ±»Ëø¶¨¡£ËøÖ»Óй²ÏíËøºÍÅÅËûËøÁ½ÖÖ¡£
ËøµÄ¼æÈÝÐÔ£º
SX
S 10
X 00
ÊÂÎñµÄ¸ôÀ뼶±ð£º
Read Uncommitted
Êý¾Ý¶Áȡʱ²»ÐèÒªËø¶¨
Read Committed
Êý¾Ý¶ÁȡʱÐèÒª¹²ÏíËø¶¨
Repeatable Re ......