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

SqliteÔÚC#ÖеÄÓ¦ÓÃ

ÔÚ .NET ÀïÃæʹÓà SQLite£¬ ÎÒÕâÀïʹÓõÄwrapperÊÇ System.Data.SQLite£¬ËüÖ»ÐèÒªÒ»¸ödll,½Ó¿Ú·ûºÏADO.Net 2.0µÄ¶¨Òå,ÐÔÄÜÒ²²»´í,NHibernateÓõÄÒ²ÊÇËü£¬Ä¿Ç°Ö§³ÖADO.NET 3.5ÁË£¬Ö§³Ö¼¯³ÉÔÚ VS2005 ºÍ VS2008ÀïÃ棬¶øÇÒÖ§³Öwince£¬ÊǸöÁÁµã
ÒòΪ·ûºÏADO.NETµÄ¹æ·¶£¬ËùÒÔʹÓ÷½Ê½£¬»ù±¾ºÍ SqlClient, OleDbµÈÔ­ÉúµÄÒ»ÖÂ
using System.Data;
using System.Data.SQLite;
//...
using (SQLiteConnection cn = new SQLiteConnection(
    "Data Source=Test.db3;Pooling=true;FailIfMissing=false")
    )
//PoolingÉèÖÃΪtrueʱ£¬SQLÁ¬½Ó½«´ÓÁ¬½Ó³Ø»ñµÃ£¬Èç¹ûûÓÐÔòн¨²¢Ìí¼Óµ½Á¬½Ó³ØÖÐ,ĬÈÏÊÇtrue¡£
//FailIfMissingĬÈÏΪfalse£¬Èç¹ûÊý¾Ý¿âÎļþ²»´æÔÚ£¬»á×Ô¶¯´´½¨Ò»¸öеģ¬ÈôÉèÖÃΪtrue£¬½«²»»á´´½¨£¬¶øÊÇÅ׳öÒì³£ÐÅÏ¢¡£
{
    //ÔÚ´ò¿ªÊý¾Ý¿âʱ£¬»áÅжÏÊý¾Ý¿âÊÇ·ñ´æÔÚ£¬Èç¹û²»´æÔÚ£¬ÔòÔÚµ±Ç°Ä¿Â¼Ï´´½¨Ò»¸ö
    cn.Open();
    using (SQLiteCommand cmd = new SQLiteCommand())
    {
        cmd.Connection = cn;
        //½¨Á¢±í£¬Èç¹û±íÒѾ­´æÔÚ£¬Ôò±¨´í
        cmd.CommandText = "CREATE TABLE [test] (id int, name nvarchar(20))";
        cmd.ExecuteNonQuery();
        //²åÈë²âÊÔÊý¾Ý
        for (int i = 2; i < 5; i++)
        {
            cmd.CommandText = string.Format("INSERT INTO [test] VALUES ({0}, '¶Å˼²¨¼¼ÊõÌÖÂÛÇøÓò')", i);
            cmd.ExecuteNonQuery();
        }
        for (int i = 5; i < 10; i++)
        {
            cmd.CommandText = string.Format("INSERT INTO [test] VALUES ({0},


Ïà¹ØÎĵµ£º

asp.net C#ÍøÕ¾ÏîÄ¿ »ñÈ¡ÎïÀí·¾¶¡¢ÐéÄâ·¾¶µÄ·½·¨

-----------------------------.csÀàÎļþÖÐ
µ±Ç°ÏîÄ¿µÄÎïÀí·¾¶Â  
   
  strPath   =   this.Server.MapPath(Request.PhysicalApplicationPath);  
   
  ÄãҪ˵Ã÷ʲô“ÀàÎļþ”¡£ÈκÎPAGE¡¢CONTROL´úÂëÒ²ÊÇÔÚÀà ......

netÖÐǰ̨javascriptÓëºǫ́c#º¯ÊýÈçºÎÏ໥ͨÐÅ

C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ
ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ ......

C#ʵÏÖXMLϵÁл¯ºÍ·´ÏµÁл¯µÄ×ܽá

³£ÓõÄϵÁл¯¶¨Ò壨using System.Xml.Serialization;£©
[XmlAttribute("name")]        // ¶¨Òå<Tag name="…"></Tag>
[XmlElement("label")]        // ¶¨Òå<label>…</label>
[XmlIgnoreAttrib ......

ÓÃC#¿ª·¢ÅúÁ¿ACCESSÊý¾Ý¿âѹËõ³ÌÐò

ÏÂÃæ¸ø³öÁËʹÓÃC# ¿ª·¢µÄÒ»¸öѹËõACCESSÊý¾Ý¿âµÄ³ÌÐò
ÏñFolderBrowserDialog£¨ÓÃÓÚä¯ÀÀÑ¡ÔñÎļþ¼ÐµÄ¶Ô»°¿ò£©¡¢MessageBox£¨ÏûÏ¢´¦Àí¶Ô»°¿ò£©¡¢DirectoryInfo£¨Ä¿Â¼ÐÅÏ¢£¬¿ÉÓÃÓÚ´´½¨¡¢¼ì²âÊÇ·ñ´æÔڵȶÔĿ¼µÄ²Ù×÷£©¡¢FileInfo£¨ÎļþÐÅÏ¢£¬¿ÉÓÃÓÚÎļþµÄ¼ì²â¡¢ÎļþÐÅÏ¢µÄ»ñÈ¡¡¢¸´ÖƵȲÙ×÷£©¡¢DataGridView£¨Êý¾Ý±í¸ñ¿Ø¼þ£¬ÓÃÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ