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

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

概述System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.SQLite; using System.Data.Common; namespace WM {      class SQLHelper     {          //建库          pub

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;

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;

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;

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;

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;

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;

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">


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

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">

{

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

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">

{

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">

//建库

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()

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">

{

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();

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";

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;

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">

}

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">

//建表

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)

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">

{

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();

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

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">

{

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())

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">

{

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))";

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();

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))";

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();

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))";

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();

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">

}

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">

}

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)

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">

{

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">


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">

}

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">

}

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">

//查询

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)

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">

{

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();

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);

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);

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;

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">

}

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">

//其它 *** 作

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)

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">

{

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;

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())

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">

{

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;

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();

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">

}

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;

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">

}

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">

}

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">

}

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">

总结

以上是内存溢出为你收集整理的自己写的 *** 纵SQLite数据库的SQLHelper,备忘的-_-(VS2005 C#)全部内容,希望文章能够帮你解决自己写的 *** 纵SQLite数据库的SQLHelper,备忘的-_-(VS2005 C#)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1178479.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存