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

SQL clr - MS-SQL Server / ·Ç¼¼Êõ°æ

ÏëÓÃSQL CLR×öÈçϵĴ洢¹ý³Ì,µ«ÊÇ·¢ÏÖ±¨´í: 
{ÓÉÓÚ´úÂëÒѾ­¹ýÓÅ»¯»òÕß±¾»ú¿ò¼ÜλÓÚµ÷ÓöÑÕ»Ö®ÉÏ£¬ÎÞ·¨¼ÆËã±í´ïʽµÄÖµ¡£} 
¶øÇÒÈç¹ûÊý¾Ý´Ócase 1ͨ¹ýʱ¾ÍÊÇÕýÈ·µÄ,´Ócase 2ͨ¹ýʱ´íÎó 
²¢ÇÒÔÚcase 2ÖеÄmyCommand.CommandTextºóÈç¹ûÊǸöselectÓï¾ä¾ÍÊÇÕýÈ·µÄ,µ«ÊÇÔËÐд洢¹ý³Ì¾Íͨ²»¹ý,¶øÇÒµ¥¶À²âÊÔ´æ´¢¹ý³ÌÊÇÕýÈ·µÄ,ºÃÏñÎÊÌâÊdzöÔÚrecordµÄ·¢ËÍÉÏ,Çó½Ì! 
[SqlProcedure] 
public static void procClr(SqlXml sx) 

XPathDocument doc = new XPathDocument(sx.CreateReader()); 
XPathNavigator nav = doc.CreateNavigator(); 
XPathNodeIterator i = nav.Select(@"/NewDataSet/StandardDT"); 

SqlDataRecord record =new SqlDataRecord(new SqlMetaData("i_num", SqlDbType.Int)); 

SqlPipe sp = SqlContext.Pipe; 
sp.SendResultsStart(record); 

while (i.MoveNext()) 

//----½âÎöXMLÊý¾Ý---- 
  int inum=Convert.ToInt32(i.Current.Evaluate("string(i_num[1]/text())")); 
//-----´¦ÀíÊý¾Ý------ 
  int flag=Function(inum);//×Ô¶¨Ò庯Êý,ÎÞÎó 
  switch(flag) 
  { 
  case 1: 
  { 
  record.SetValues(1); 
  break;  
  } 
  case 2: 
  { 
  using (SqlConnection myConnection = new S


Ïà¹ØÎÊ´ð£º

¹ØÓÚSQLSERVERµ×²ãÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÇëÎÊһϣ¬ÍâÍøÁ½Ì¨SQLSERVERʵÀýÊý¾Ý´«Ê䣬ÓÐûÓвÉÓÃÊý¾ÝѹËõºÍ¼ÓÃÜ¡£Ñ¹Ëõ±ÈÊǶàÉÙ£¬¼ÓÃÜÊÇʲô¼ÓÃÜËã·¨£¿Ïà¹ØÎĵµÄÄÀï¿ÉÒÔÕÒµ½£¿Ð»Ð»


ÎÒÒ²ÏëÖªµÀ£¡¹Ø×¢´ËÌù£¡

¹Ø×¢¡«¡«

Êý¾Ý¿â´óÅ£¶¼ÄÄÈ¥ÁË°¡£¿
......

ASPÁ´½ÓSQLµÄ¼òµ¥µÇ½½çÃæ - .NET¼¼Êõ / ASP.NET

protected void btnLogin_Click(object sender, EventArgs e)
  {
  SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......

pl/sql - Oracle / ¿ª·¢

СµÜ£¬×î½üҪתÐÐÈ¥×öoracle¿ª·¢ÁË£¬ÓÉÓÚ´óѧ±Ïҵʱ£¬×ßÁ˸öÍä·£¬ÏÖÔÚºÜСÐÄ£¬ÎÊÏ£¬×öPL/SQLÓÐûÓÐǰ;£¿£¿£¿
µ±È»ÎÒ˵µÄÕâ¸öǰ;ÊÇÖ¸ ÒÔºóÒªÌø²Û£¬Êг¡¶ÔÕâÑùµÄÈ˲ŵÄÐèÇóÁ¿´ó²»´ó£¿£¿

3q ÄÇ¿´À´»¹Ö»ÄÜÏȽӴ ......

C#ºÍÊý¾Ý¿âSQL - MS-SQL Server / »ù´¡Àà

ÎÒÃÇC#×öÒ»¸ö´°Ìå ÍùÊý¾Ý¿âÀï²åÈëÊý¾Ý
  SqlConnection cn = new SqlConnection("Data Source=20090713-1752\\SQLEXPRESS;Initial Catalog=goods;Integrated Security=True");
  ......

ÇóÒ»sqlÓï¾ä - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÏÖÔÚÓÐÁ½ÕÅ±í£ºÎÄÕÂÖ÷±íA(articleId,articleTitle)£¬ÎÄÕÂÆÀÂÛ±íB(commentId,articleId,commentTitle)
ÏÖÔÚÎÒÏëʵÏÖÕâÑùµÄ¹¦ÄÜ£ºÁгöÎÄÕÂÁÐ±í£¬ÆäÖÐÿƪÎÄÕ±êÌâÏÂÃæÁгö´ËÎÄÕµÄÇ°2¸öÎÄÕÂÆÀÂÛ£¬ÇëÎÊsqlÓï¾äÔõôд°¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ