自己写的操纵SQLite数据库的SQLHelper,备忘的-_-(VS2005 C#)

前端之家收集整理的这篇文章主要介绍了自己写的操纵SQLite数据库的SQLHelper,备忘的-_-(VS2005 C#)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

System;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

using System.Collections.Generic;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

using System.Text;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

using System.Data;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

using System.Data.sqlite;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

using System.Data.Common;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/None.gif">


@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/None.gif">

namespace WM

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

class sqlHelper

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

//建库

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

public DbConnection getCon()

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

DbConnection con = new sqliteConnection();

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

con.ConnectionString = "Data Source=WebMan.db";

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

return con;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

//建表

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

public void CreateWebTable(DbConnection con)

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

con.Open();

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

try

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

using (DbCommand com = con.CreateCommand())

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

com.CommandText = "create table webtable( id integer primary key,username varchar(20),qiyename varchar(50),webname varchar(50),tel varchar(20),lianxiren varchar(20),fufeidate varchar(10),daoqidate varchar(10),price varchar(10),status varchar(10),yewuyuan varchar(15),mark varchar(50))";

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

com.ExecuteNonQuery();

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

com.CommandText = "create table yewutable( id integer primary key,num varchar(20),workername varchar(20),gender varchar(5),age varchar(5),bear varchar(10),fromwhere varchar(60),mark varchar(50))";

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

com.ExecuteNonQuery();

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

com.CommandText = "create table usertable( id integer primary key,pwd varchar(20))";

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

com.ExecuteNonQuery();

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

catch (Exception)

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">


@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

//查询

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

public DataSet Query(DbConnection con,string sql)

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

DataSet ds = new DataSet();

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

DbDataAdapter da = new sqliteDataAdapter(sql,(sqliteConnection)con);

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

da.Fill(ds);

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

return ds;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

//其它操作

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

public int Control(DbConnection con,string sql)

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

int i = 0;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

using (DbCommand com = con.CreateCommand())

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

{

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

com.CommandText = sql;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

i = com.ExecuteNonQuery();

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

return i;

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

}

@H_502_3@650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpic.PHP?refimg=" + this.src)" src="http://img.jb51.cc/vcimg/static/loading.png" align="top" src="http://approlife.blog.51cto.com/images/editer/InBlock.gif">

原文链接:https://www.f2er.com/sqlite/203223.html

猜你在找的Sqlite相关文章