Why sqlite complains to this code? Why sqlite complains to this code? sqlite sqlite

Why sqlite complains to this code?


SQLite doesn't allow you to insert multiple rows with the values clause.

Try a union all select instead:

INSERT INTO      Categories                 (CategoryId, Name, UrlName, CategoryIndex)          select 'b2cc232c-0d5c-4f35-bb6f-29c67d7d40c2', 'Using Forums', 'usingforums', 0union all select 'ad9b355d-77bf-4a30-b3fe-7d562df2899f', '.NET Development', 'netdevelopment', 1....


SQLite doesn't support the multi-values insert syntax - that's a MySQL extension to SQL syntax. You'll have to rewrite this as one-query-per-value-set, so 7 different queries.


Because your SQL is not valid. You can only insert a single tuple of values in each INSERT statement.