Error: "unrecognized token" in SimpleSqlite INSERT TABLE

Hi all,
I get this error when I do INSERT using SimpleSqlite extension:
--> unrecognized token: "xxxxxxxx" (code 1 SQLITE_ERROR[1])
This is the block that returns the error:


Note: the values ​​"Title", "Artist" and "Genre" have been enhanced by the program "MusicBrainz Picard" (in the Tags of MP3 files).
If I enhance the MP3 tags manually (not with MusicBrainz) the INSERT works regularly!
Can someone help me?
thank you very much!!!!

What do you mean by this ?

What does an "enhanced" tag look like as text ?

Also check your entire INSERT sql using Do It in Companion to ensure you have correct spacings.

This is the initial content of an MP3 file whose tags have been loaded with a normal tag generation program:


Instead, this is the initial content of an MP3 file whose tags were loaded via MusicBrainz:

I tried with DO IT, but the result is the same type of error

Thank you!

You will need to show the values you are providing in variables Artista, Titolo, Genere, and Filename

Yes, correct... this is the command and the error:

I have already tried replacing the BLANK with another character, but it didn't help.

Not sure I understand this ?

I would also like to see a space between TabCanzoni and (Artista,....)

With your database open run this command:

SELECT * FROM pragma_table_info('TabCanzoni')

image

What do you get back ?

This is the result of the select:

(To avoid having spaces in the values ​​to be inserted in the database I tried to replace them with a significant character, but it was no use)

You do not have an id field as a primary key. Is there another record in your db with Nana Mouskouri as the artist ?

no, there is not. Anyway now I try to add the primary key.

A new id will be set automatically by slqlite so you do not have to set it in your columns and values.

OK thanks.
I don't know what to think anymore... the INSERT syntax seems correct.

Could it be the encoding (UTF-8, UTF-16, ...) of the Artist, Title and Genre strings?...

I do not know. I have tried everything you show at this end, and have no issues submitting a record.

I cannot replicate the error but it seems there is something wrong with the variable Artista. Replace with a text block with a single word and see what happens.

Here is the result:

It seems that there is something wrong with the character encoding in the strings coming from the MP3 file

I don't know what to do anymore :face_with_head_bandage:

You appear to be getting an extra quote from somewhere:

image

This was also present in your previous INSERT.

There may be a hidden character ? Try using the trim block on your variables?

You could also try setting your variables to a label then see what the label shows, or try using the label.txt block in your INSERT sql ?

AWESOME! ... works TRIM>GET ARTIST, etc..


Thank you!!!!! :partying_face:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.