by Ski6 » Tue Sep 07, 2021 12:52 pm
As the regexp script does not seem forthcoming, I wanted to see if I could do db updates in VS using SQL calls.
I stumbled past the collation thing for WHERE statements in SELECTs using COLLATE NOCASE for strings, but have had no luck doing UPDATES:
using (SQLiteConnection connection = new SQLiteConnection(constr))
{
string updateQuery = @"UPDATE main.Songs SET SongTitle = @SongTitle WHERE ID = @ID";
var result = connection.Execute(updateQuery, new
{
ID = 320923,
SongTitle = "A different song title"
});
}
This yields a collate error and I can't guess what it wants.
Does anyone know a way to do an SQL UPDATE to the Songs DB? Entity framework? Dapper?
As the regexp script does not seem forthcoming, I wanted to see if I could do db updates in VS using SQL calls.
I stumbled past the collation thing for WHERE statements in SELECTs using COLLATE NOCASE for strings, but have had no luck doing UPDATES:
using (SQLiteConnection connection = new SQLiteConnection(constr))
{
string updateQuery = @"UPDATE main.Songs SET SongTitle = @SongTitle WHERE ID = @ID";
var result = connection.Execute(updateQuery, new
{
ID = 320923,
SongTitle = "A different song title"
});
}
This yields a collate error and I can't guess what it wants.
Does anyone know a way to do an SQL UPDATE to the Songs DB? Entity framework? Dapper?