How can I do a INSERT with parameters inline at SQLite?
I am generating a Sqlite from Sql Server, to do this I first run a script on sql server that returns a string with thousands of lines, like this:
INSERT INTO [Criterio] ([cd1], [cd2], [cd3], [dc4], [dc5], [dt6], [dc7], [dt8], [dt9], [dt10], [dt11]) VALUES ('FFFFFFFF-FFFF-FFFF-FFFF-B897A4DE6949',10, 20, '', NULL, NULL,'', NULL, julianday('2011-11-25 17:00:00'), NULL, NULL);
But it is too slow(I am already using transaction). I did another test using parameters, and I have a big performance improvement.
Does SQLite have any way to pass variables together in an INSERT statament, like sql server do.
Resuming, what I need is to generate a text script to do inserts. But using parameters. SQL Server works using this:
EXECUTE sp_executesql @sqlCommand, N'@city nvarchar(75)', @city = @city
It´s not possible. I resolved reading the data from SqlServer to a DataTable, then I create a DbCommand with parameters, filling parameters and calling ExecuteNonQuery for each line.