参考文章来源SQLite 之 C#版 System.Data.SQLite 使用
class db {
private SQLiteConnection dbConnection;
//private SQLiteCommand cd;
//private SQLiteDataReader read;
public SQLiteConnection lian(string path)
{
//创建连接字符串
try
{
string databaseFileName = path;
string connectionString = "data source = " + databaseFileName;
//链接数据库
dbConnection = new SQLiteConnection(connectionString);
dbConnection.Open();
}
catch (Exception e)
{
Console.Write(e);
}
return dbConnection;
}
}
namespace qq
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load