using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SQLite; using System.Data.SqlClient; using System.IO; namespace sqlitesample { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void insertconnect_Click(object sender, EventArgs e) { // [snip] - As C# is purely object-oriented the following lines must be put into a class: // We use these three SQLite objects: SQLiteConnection sqlite_conn; SQLiteCommand sqlite_cmd; SQLiteDataReader sqlite_datareader; // create a new database connection: sqlite_conn = new SQLiteConnection("Data Source=dbDemo.db;Version=3;New=True;Compress=True;"); // open the connection: sqlite_conn.Open(); // create a new SQL command: sqlite_cmd = sqlite_conn.CreateCommand(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)