Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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´úÂëÒ²ÊÇÔÚÀà ......

HTMLתPDF£¨C# itextsharp£©

Ò»¡¢ ÐèÇ󣺽«HTMLתPDF´òÓ¡¡£WebÏîÄ¿ÖÐ×ÜÊÇÓÐÕâÑùµÄÐèÇ󣬺ÜÊÇÈÃÈË¿àÄÕ¡£
¶þ¡¢ ·ÖÎö£ºÈçºÎÍê³ÉÕâ¸ö¹¤×÷£¿
1¡¢ ÐèÒª½âÎöHTML£¬È»ºóÀûÓÃitextsharp»æÖÆpdfÎĵµ¡£½âÎöHTMLÊÇÒ»¸öºÜÄÑÍê³ÉµÄÈÎÎñ£¬¸÷¸öä¯ÀÀÆ÷¶ÔHTMLµÄ½âÎöÎ廨°ËÞÍÖªµÀÕâ²»ºÃ½â¾ö¡£ÕâÌõ·²»ºÃ×ߣ¬µ«Ò²ÊÇ¿ÉÒÔÍê³ÉµÄ£¬Í¨¹ýwebbrowserÀà¿ÉÒÔ½âÎöHTML»ñÈ¡¸÷¶ÔÏóµ ......

ASP.NetÖÐÓÃC#ʵÏÖÕ¾µã¼ÆÊýÆ÷Óû§¿Ø¼þ

asaxÎļþ£º
¡¡¡¡<%@ Control Language="c#" AutoEventWireup="false" Codebehind="counter.ascx.cs" Inherits="JiAnWeb.counter" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
¡¡¡¡<LINK href="css.css" rel="stylesheet">
¡¡¡¡<FONT face="ËÎÌå">
¡¡¡¡<TABLE id="table_coun ......

ASP.NET(C#)³£ÓôúÂë30Àý

1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString( ......

sqlite´¥·¢Æ÷Ò»Àý

int column_names_printed = 0;
void print_row(int n_values, char** values)
{
    int i;
    for (i = 0; i < n_values; ++i) {
        printf("%10s", values[i]);
    }
    printf("\n& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ