|
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SQLite;
namespace CreateTestDatabases
{
public class Utils
{
public static SQLiteConnection CreateConnection(string dbpath)
{
SQLiteConnectionStringBuilder builder = new SQLiteConnectionStringBuilder();
builder.DataSource = dbpath;
return new SQLiteConnection(builder.ConnectionString);
}
public static void RunCommand(string command, params SQLiteConnection[] clist)
{
foreach (SQLiteConnection conn in clist)
{
SQLiteCommand cmd = new SQLiteCommand(command, conn);
cmd.ExecuteNonQuery();
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
My name is Liron Levi and I'm developing software for fun & profit for 15 years already.