public void InsertRow(string sqConnectionString)
{
// If the connection string is empty, use default.
if(sqConnectionString == "")
{
sqConnectionString =
"DataSource=mydatabase.db;";
}
SQLiteConnection myConn = new SQLiteConnection(sqConnectionString);
string myInsertQuery = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')";
SQLiteCommand sqCommand = new SQLiteCommand(myInsertQuery);
sqCommand.Connection = myConn;
myConn.Open();
try
{
sqCommand.ExecuteNonQuery();
}
finally
{
myConn.Close();
}
}