i have a workaround. create an action in the customdb preferences to delete the field and then trigger it using WSH panel mod before running the sqlite command.
Nice trick! It works now
I used the Litex COM wrapper, so I can do all in the script, without external system call or ODBC driver. Unpack the single file litex\bin\sqlite3.dll to the "components" directory and run "regsvr32 .\sqlite3.dll" command, that's all.
Delete field via trick and call
function WriteCustomDB(artist,album,title,field,value){
var urlstring = artist+ ", " + album + ", " + title;
oDb = new ActiveXObject("LiteX.LiteConnection");
oStmt = new ActiveXObject("LiteX.LiteStatement");
oDb.Path="customdb_sqlite.db";
oDb.open();
oStmt.ActiveConnection = oDb;
try {
oStmt.CommandText = "INSERT OR REPLACE INTO quicktag(url, subsong, fieldname, value) VALUES(:url, :subsong, :fieldname, :value)";
oStmt.Prepare();
oStmt.BindParameter(":url", urlstring);
oStmt.BindParameter(":subsong", -1);
oStmt.BindParameter(":fieldname", field);
oStmt.BindParameter(":value", value);
oStmt.Execute();
}
catch(e){
fb.trace( e )
fb.trace( "Number: ", e.number>>16 & 0x1FFF, e.number & 0xFFFF );
fb.trace( "Message:", e.message );
fb.trace( "Description:", e.description );
}
finally {
oStmt.Close();
oDb.close();
}
}
Of course, this is for default customdb key "%artist%, %album%, %title%", otherwise urlstring should be adjusted.