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

C# »Ø¹ö1

c#ÊÂÎñ»Ø¹ö£¨×ª£©
×÷Õߣºxue5ya  À´Ô´£º²©¿ÍÔ°  ·¢²¼Ê±¼ä£º2009-03-20 16:08  ÔĶÁ£º263 ´Î  Ô­ÎÄÁ´½Ó   [ÊÕ²Ø]  
Code
public void UpdateContactTableByDataSet(DataSet ds,string strTblName) 

    try 
    { 
        string strConnection ="server = ;database = ;uid = ;pwd = ;Connec Timeout = 60 ";
        SqlDataAdapter myAdapter = new SqlDataAdapter(); 
        SqlConnection  conn = new SqlConnection(strConnection); 
        SqlCommand myCommand = new SqlCommand("select * from strTblName",conn); 
        myAdapter.SelectCommand = myCommand; 
        SqlCommandBuilder myCommandBuilder = new SqlCommandBuilder(myAdapter);
        
        conn.Open(); 
        SqlTransaction myTrans = conn.BeginTransaction(); 
        myCommand.Transaction = myTrans;
    
        try 
        { 
            myAdapter.Update(ds,strTblName); 
            myTrans.Commit(); 
        } 
        


Ïà¹ØÎĵµ£º

ÓÃC#´´½¨XML[¼òµ¥´úÂë]

XmlDocument doc = new XmlDocument();
XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "GB2312", null);
doc.AppendChild(dec);
//´´½¨Ò»¸ö¸ù½Úµã£¨Ò»¼¶£©
XmlElement root = doc.CreateElement("First");
doc.AppendChild(root);
//´´½¨½Úµã£ ......

C#µ÷ÓÃDLL £¨strmagic£©

¡¡¡¡´ó¼ÒÔÚʵ¼Ê¹¤×÷ѧϰC#µÄʱºò£¬¿ÉÄÜ»áÎÊ£ºÎªÊ²Ã´ÎÒÃÇҪΪһЩÒѾ­´æÔڵŦÄÜ£¨±ÈÈçWindowsÖеÄһЩ¹¦ÄÜ£¬C++ÖÐÒѾ­±àдºÃµÄһЩ·½·¨£©ÒªÖØÐ±àд´úÂ룬C#ÓÐûÓз½·¨¿ÉÒÔÖ±½Ó¶¼ÓÃÕâЩԭ±¾ÒѾ­´æÔڵŦÄÜÄØ£¿´ð°¸Êǿ϶¨µÄ£¬´ó¼Ò¿ÉÒÔͨ¹ýC#ÖеÄDllImportÖ±½Óµ÷ÓÃÕâЩ¹¦ÄÜ¡£
¡¡¡¡DllImportËùÔÚµÄÃû×Ö¿Õ¼ä using System.Runt ......

c# ²Ù×÷excel

 OleDbConnection conn = null;
            try
            {
               `string strConn;
  &n ......

c#ÖÐÒ»¸ö´°Ìåµ÷ÓÃÁíÒ»¸ö´°ÌåµÄ¿Ø¼þ¼°·½·¨£¨×ªÌù£©

²Î¿¼×ÊÁÏ£ºhttp://wenwen.soso.com/z/q39607884.htm
ÈçºÎÔÚÒ»¸ö´°ÌåÖе÷ÓÃÁíÒ»¸ö´°ÌåµÄ¿Ø¼þ»ò·½·¨
´ð°¸ÊÇ´Ó¹¹Ô캯ÊýÖд«µÝ²ÎÊý¡£
Òª°ÑForm1ÖеĿؼä¸Ä³ÉpublicÊôÐÔ
¾ßÌåʵÏÖ¹ý³ÌÇë²Î¿´Ò»Ï´úÂë(ÔÚform2µÄtextbox1ÖÐÊäÈëÈ»ºóÔÚform1ÖеÄlabel1ÖÐÏÔʾtextboxÖеÄÄÚÈÝ
//form1´úÂë,form1ÖÐÓÐÒ»¸ölabel1ºÍÒ»¸öbutton1,Æä ......

C# »Ø¹ö

 private void save_db(){
    SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings[""].ToString());
    SqlCommand comm = new SqlCommand();
    conn.Open();
    SqlTransaction rollbk2= conn.BeginTransaction();
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ