try { string query = @"insert into tbl (pkey, field) values (@_pkey, @_txt);"; string conString = @"Data Source = \testdb.s3db; version = 3;"; SQLiteConnection con = new SQLiteConnection(conString); con.Open(); SQLiteCommand cmd = new SQLiteCommand(query, con); cmd.Parameters.Add("@_pkey", System.Data.DbType.Int32).Value = 10; cmd.Parameters.AddWithValue("@_txt", "hello world"); cmd.ExecuteNonQuery(); } catch (Exception ex) { Console.WriteLine(ex.Message); }
SQL logic error or missing database no such table: tbl Press any key to continue . . .
string conString = @"Data Source = c:\myFolder\testdb.s3db; version=3;";
c:\myFolder
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)