Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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µÄÔöɾ¸Ä²é


ÒÑÖªÓÐÒ»¸öXMLÎļþ£¨bookstore.xml£©ÈçÏ£º  
  <?xml   version="1.0"   encoding="gb2312"?>  
  <bookstore>  
      <book   genre="fantasy"   ISBN="2-3631-4">  
       &n ......

ÓÃ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#ʹÓÃSQLDMOʵÏÖ¶ÔMSSQLÊý¾Ý¿â½øÐб¸·ÝºÍ»Ö¸´

public sealed class DbOper
{
     ///<summary>
     /// DbOperÀàµÄ¹¹Ô캯Êý
     ///</summary>
     private DbOper()
     {
     }
     ......

C# ¿ìËٹػú´úÂë

½ñÌìÓõ½Õâ¸ö£¬ÍøÉÏÕÒ¸ö²»´íµÄ£¬±£´æÏÂÀ´¡£
×¢Ò⣺Õâ¸ö·½·¨ÊÇ¿ìËٹػú£¬²»»á±£´æÄãµÄÈκÎδ±£´æÐÅÏ¢¡£
// Õâ¸ö½á¹¹Ì彫»á´«µÝ¸øAPI¡£Ê¹ÓÃStructLayout
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct TokPriv1Luid
{
public int Count;
public ......

C#×Ô¶¯¹Ø»úÔ´Âë

Ô´ÂëÈçÏ£º
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.IO;
using Microsoft.Win32;
namespace mv
{ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ