ÈçºÎ¸ßЧʹÓÃSQLite .net (C#)
SQLite ×÷Ϊһ¸öÇáÁ¿¼¶Ç¶ÈëʽÊý¾Ý¿â£¬»¹ÊǷdz£ºÃÓõġ£ÓêºÛ¼«Á¦ÍƼö~~~~~~
½ñÌìÓиöÅóÓѲâÊÔ SQLite£¬È»ºóµÃ³öµÄ½áÂÛÊÇ£ºSQLite ЧÂÊÌ«µÍ£¬ÅúÁ¿²åÈë1000Ìõ¼Ç¼£¬¾ÓÈ»ºÄʱ 2 ·ÖÖÓ£¡
ÏÂÃæÊÇËû·¢¸øÎҵIJâÊÔ´úÂë¡£ÎÒÔÎ~~~~~~
using System.Data;
using System.Data.Common;
using System.Data.SQLite;
// ´´½¨Êý¾Ý¿âÎļþ
File.Delete("test1.db3");
SQLiteConnection.CreateFile("test1.db3");
DbProviderFactory factory = SQLiteFactory.Instance;
using (DbConnection conn = factory.CreateConnection())
{
// Á¬½ÓÊý¾Ý¿â
conn.ConnectionString = "Data Source=test1.db3";
conn.Open();
// ´´½¨Êý¾Ý±í
string sql = "create table [test1] ([id] INTEGER PRIMARY KEY, [s] TEXT COLLATE NOCASE)";
DbCommand cmd = conn.CreateCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.ExecuteNonQuery();
// Ìí¼Ó²ÎÊý
cmd.Parameters.Add(cmd.CreateParameter());
// ¿ªÊ¼¼Æʱ
Stopwatch watch = new Stopwatch();
watch.Start();
// Á¬Ðø²åÈë1000Ìõ¼Ç¼
for (int i = 0; i < 1000; i++)
{
cmd.CommandText = "insert into [test1] ([s]) values (?)";
cmd.Parameters[0].Value = i.ToString();
cmd.ExecuteNonQuery();
}
// Í£Ö¹¼Æʱ
watch.Stop();
Console.WriteLine(watch.Elapsed);
}
°¥~~~~ Ò»¸ö³£Ê¶ÐԵĴíÎó£¬ÎÒ¼Ó¼¸ÐдúÂë (ÐÂÔö´úÂë±ê¼Ç "// <-------------------")¡£
using System.Data;
using System.Data.Common;
using System.Data.SQLite;
// ´´½¨Êý¾Ý¿âÎļþ
File.Delete("test1.db3");
SQLiteConnection.CreateFile("test1.db3");
DbProviderFactory factory = SQLiteFactory.Instance;
using (DbConnection conn = factory.CreateConnection())
{
// Á¬½ÓÊý¾Ý¿â
conn.ConnectionString = "Data Source=test1.db3";
conn.Open();
Ïà¹ØÎĵµ£º
ÖíÄêÎÞÁÄ,¸ÄÁËÒ»¸ö´úÂ룬ÓеãD°æÄǸöÒâ˼£¬°ÑWAP PUSHµÄC#´úÂë¸Äµ½ÁËJAVA
ÔÀ´³ö´¦£º
http://www.codeproject.com/cs/internet/wappush.asp
¸Ä¹ýºóµÄ´úÂëÔÚÏÂÃ棬³ÌÐòºÃÏñ¿ÉÒÔÊä³öÁËWAPPUSHµÄ½á¹¹»¯µÄ¶«Î÷£¬µ«ÊÇ£¬Ã»ÓÐÔÚCMPPÐÒéÉϲâÊÔͨ¹ý¡£
¹²7¸öÎļþ£º
package com.wap.wbxml;
public class Runner {
&nbs ......
//ÏòÊý¾Ý¿âÖÐдÈë
private void button1_Click(object sender, EventArgs e)
{
oracleConnection1.Open();
& ......
Ê®Ììѧ»áASP.net֮ʵսϵÁУ¨C#ºÍVb.netË«°æ±¾£©
µÚÒ»Ìì
ÎÒÈÏΪASP.NET±ÈASPÄѺܶ࣬ϣÍû´ó¼Ò×öºÃ×¼±¸¡£ÄÑÄÑÔÚʵÏÖͬһ¸öЧ¹ûÓкܶ෽·¨£¬´ó¼Ò»òÐí»áÒÉ»ó¡£Ê®Ììѧ»áϵÁн̳̻áÇåÎúµÄд³ö¸÷ÖÖ·½·¨£¬Èôó¼ÒÄÜÉÙÒ»µã¿²¿À¡£ÔÚASPÀïÃ棬´ó¼Ò¼¸ºõ¶¼ÊÇʹÓÃVB£¬Êý¾Ý¿âÂҲÎÞ·ÇÊÇSQLºÍACCESS¡£ÔÚASP.NETÀïÃ棬Êý¾Ý¿â»¹ÊÇÕ ......
C#£¨C sharp£©×Ö·û´®ºÍʱ¼äµÄÏ໥ת»»¡£
Ò»¡¢DateTime –> string
ʱ¼äÀàÐÍת»¯³É×Ö·û´®ÀàÐÍ£¬ÄÇÊÇÏ൱µÄ¼òµ¥£¬Ö±½Óµ÷ÓÃToString()·½·¨¼´¿É¡£È磺
DateTime dt = DateTime.Now;
string dtStr = dt.ToString();
Èç¹ûÏë¶ÔÊä³ö¸ñʽ»¯£¬¿ÉÒÔÕâôд£º
dt.ToString("yyyyÄêMMÔÂddÈÕ"); ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryS ......