DataAccess: use INSERT OR IGNORE for AddBlog to prevent UNIQUE constraint on duplicate blog names
This commit is contained in:
1 parent
fdfe85d118
commit
3d8c5a2823
1 file changed
+1
-1
@@ -93,7 +93,7 @@ namespace URLNotesGrabberCORE
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
string sql = "INSERT INTO Blogs (BlogName) values('" + blogName + "')";
|
||||
string sql = "INSERT OR IGNORE INTO Blogs (BlogName) values('" + blogName + "')";
|
||||
SQLiteCommand command = new SQLiteCommand(sql, connection);
|
||||
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
Reference in new issue
Block a user