ÔÚ.NET C#ÖÐʹÓÃsqlite
1¡£´Ówww.sqlite.orgÏÂÔØSQLite 3.3.4µÄ°æ±¾
ΪÁË·½±ã£¬ÎÒ°ÑËü½âѹÁË£¬¾ÍÒ»¸öSQLite3.exe£¬·ÅÈëWindowsĿ¼Ï¡£
Cmd ½øÈëÃüÁîÐÐ
1)
´´½¨Êý¾Ý¿âÎļþ:
>SQLite3 d:\test.db »Ø³µ
¾ÍÉú³ÉÁËÒ»¸ötest.dbÔÚdÅÌ¡£
ÕâÑùͬʱҲSQLite3¹ÒÉÏÁËÕâ¸ötest.db
2)
ÓÃ.help¿ÉÒÔ¿´¿´ÓÐʲôÃüÁî
>.help »Ø³µ¼´¿É
3)¿ÉÒÔÔÚÕâÀïÖ±½ÓÊäÈëSQLÓï¾ä´´½¨±í¸ñ ÓÃ;½áÊø£¬È»ºó»Ø³µ¾Í¿ÉÒÔ¿´µ½ÁË
4)¿´¿´Óд´½¨Á˶àÉÙ±í
>.tables
5)¿´±í½á¹¹
>.schema ±íÃû
6)¿´¿´Ä¿Ç°¹ÒµÄÊý¾Ý¿â
>.database
7)Èç¹ûÒª°Ñ²éѯÊä³öµ½Îļþ
>.output ÎļþÃû
> ²éѯÓï¾ä£»
²éѯ½á¹û¾ÍÊä³öµ½ÁËÎļþc:\query.txt
°Ñ²éѯ½á¹ûÓÃÆÁÄ»Êä³ö
>.output stdout
8)°Ñ±í½á¹¹Êä³ö£¬Í¬Ê±Ë÷ÒýÒ²»áÊä³ö
.dump ±íÃû
9)Í˳ö
>.exit »òÕß.quit
2¡£´Óhttp://sqlite.phxsoftware.com/ÏÂÔØAdo.netÇý¶¯¡£
ÏÂÔØÁË°²×°£¬ÔÚ°²×°Ä¿Â¼ÖдæÔÚSystem.Data.SQLite.dll
ÎÒÃÇÖ»ÐèÒª¿½±´Õâ¸öÎļþµ½ÒýÓÃĿ¼£¬²¢Ìí¼ÓÒýÓü´¿É¶ÔSQLiteÊý¾Ý¿â²Ù×÷ÁË
ËùÓеÄAdo.net¶ÔÏó¶¼ÊÇÒÔSQLite¿ªÍ·µÄ£¬±ÈÈçSQLiteConnection
Á¬½Ó´®Ö»ÐèÒªÈçÏ·½Ê½
Data Source=d:\test.db »òÕßDataSource=test.db--Ó¦ÓÃÔÚºÍÓ¦ÓóÌÐò»òÕß.netÄܹ»×Ô¶¯ÕÒµ½µÄĿ¼
ʣϵľͺܼòµ¥ÁË~~
3¡£SQLÓï·¨
ÓÉÓÚÒÔÇ°ÓÃSQLServer»òÕßISeries£¬ËùÒÔDDLµÄÓï·¨ºÜº¹ÑÕ
1)´´½¨Ò»¸öµ¥¸öPrimary KeyµÄtable
CREATE TABLE [Admin] (
[UserName] [nvarchar] (20) PRIMARY KEY NOT NULL ,
[Password] [nvarchar] (50) NOT NULL ,
[Rank] [smallint] NOT NULL ,
[MailServer] [nvarchar] (50) NOT NULL ,
[MailUser] [nvarchar] (50) NOT NULL ,
[MailPassword] [nvarchar] (50) NOT NULL ,
[Mail] [nvarchar] (50) NOT NULL
) ;
2)´´½¨Ò»¸ö¶à¸öPrimary KeyµÄtable
CREATE TABLE [CodeDetail] (
[CdType] [nvarchar] (10) NOT NULL ,
[CdCode] [nvarchar] (20) NOT NULL ,
[CdString1] [ntext] NOT NULL ,
[CdString2] [ntext] NOT NULL ,
[CdString3] [ntext] NOT NULL,
PRIMARY KEY (CdType,CdCode)
) ;
3)´´½¨Ë÷Òý
CREATE INDEX [IX_Account] ON [Account]([IsCheck], [UserName]);
»¹¿ÉÒÔÊÓͼµÈµÈ¡£
4.»¹ÓкÜÓÐÓõÄSQL
Select * from Sqlite_master
Select datetime('now')
Select date('now')
Select time('now')
ÒÔ¼°ºÜ¶àº¯Êý£¬¾ßÌå¿ÉÒԲο¼SQLiteµÄwiki.
oh,»¹ÓоÍÊÇ¿´µ½ÓÐÈË˵£¬ºÃÏñ³ÉÅú²
Ïà¹ØÎĵµ£º
1 ʾÀýxmlÎļþ model.xml
<?xml version="1.0" encoding="utf-8" ?>
<DrRoot>
<SiteName>xml²Ù×÷ʾÀý</SiteName>
<SiteUrl>www.abc.com.cn</SiteUrl>
.net¿ªÔ´ÂÛ̳
<SiteKeyWord>xml²Ù×÷ʾÀý</SiteKeyWord>
<FileType>gif|jpg| ......
Ê×ÏÈÎÒºÜÒź¶µÄ¸æËß´ó¼Ò£¬ÒòΪ΢ÈíµÄ͵ÀÁ£¬Ä¿Ç°UpdatePanel»¹²»Ö§³ÖÎļþÉÏ´«¡£±äÏàµÄ½â¾ö°ì·¨¾ÍÊÇUpdatePanelÖÐÉèÖÃPostBackTrigger£º
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:FileUpload ID="FileUpload1" runat="serv ......
//¶ÁÈ¡±ê×¼Áбí
private void setModelList()
{
OleDbConnection Connection = null;
&n ......
——————————————————————————————————
ÔÚc#ÖÐÈçºÎʹÓÃÒÔÇ°c++µÄ.lib¿âºÍ.hÍ·Îļþ
zhujiang_1977£¨Öì½ ......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace AddressList
{
public partial class FrmAccessUse : Form
{
public Fr ......