I can’t tell you yes or no, because the terminology here doesn’t make any sense.
The parameter for your SQL statement (dataID) should be wrapped into a 1-tuple, which is then passed as a separate argument when you call execute. You need to call execute anyway in order to actually run the query. But the point is that execute will put the query together, not your own code’s string formatting. execute has all the logic needed to make sure it can create the SQL query safely.
No, that has nothing to do with it.
The point is that when you use ordinary string formatting code, like with % or .format or an f-string, it does not care, and has no way to know that the result is supposed to be an SQL query. It just performs an ordinary text substitution.
If the value being substituted in depends in any way, no matter how indirect, on input from the user, then this is a security risk. The user can input something that, when substituted in, creates an SQL query with completely different meaning.
An attacker doesn’t need to “find that string”. It’s only necessary to know that the code makes an SQL query that involves user input. From that point, there are a few standard tricks that can easily break most such “templates”, even without knowing what the exact query is.
For example, supposing your field has an integer type, the user could try input like 1); DROP TABLE table;--, and now the table is gone. Your text substitution created a query that looks like SELECT field1, field2 FROM table WHERE (field=1); DROP TABLE table;--), and the SQL engine dutifully did a normal SELECT, then dropped the table, then ignored a useless comment. This involves very little knowledge of the actual database structure, and the “payload” part could do all sorts of other malicious things. Once the user can figure out a valid way to “close off” the intended query, it’s an open invitation to inject any arbitrary SQL commands (and anything else remaining on the line can just be commented away).