Wait, what happened to your .readBlocking() call? You are trying to insert the tagpath strings into your database. You need to read the tags then insert the values.
It helps if you name local variables that hold paths such that it is obvious that they hold a path, like you did in your first script.