I don't know SQL Server, but here goes... Is the col1:data syntax something supported by SQL Server for normal column names or is that the syntax used for named parameters?
The ":variable" syntax is typically used as a placeholder that can be replaced at run-time with QSqlQuery::bindValue, so I suspect that's where your error is coming from. Are the column names known that you're trying to insert data into or are they truly variable and you are intending to bind values for the column names?
Here's what I'd try:
INSERT INTO dbo.mytab (:col1, :col2, :col3, :col4) VALUES (:data1, :data2, :data3, :data4)
INSERT INTO dbo.mytab (:col1, :col2, :col3, :col4) VALUES (:data1, :data2, :data3, :data4)
To copy to clipboard, switch view to plain text mode
Then prepare that statement and bind values to all of the named parameters. Never had the need to have variable column names myself, but if that's what you are trying to accomplish, might be worth a try.
Good luck.
Edit: I tried to use a named parameter for an SQLITE UPDATE statement and it doesn't work. While I don't see the restriction noted in the QSqlQuery documentation, all of the examples show named and positional parameters as values, not column names, etc.
Bookmarks