{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Microsoft.Data.Sqlite/issues/239","repository_url":"https://api.github.com/repos/aspnet/Microsoft.Data.Sqlite","labels_url":"https://api.github.com/repos/aspnet/Microsoft.Data.Sqlite/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Microsoft.Data.Sqlite/issues/239/comments","events_url":"https://api.github.com/repos/aspnet/Microsoft.Data.Sqlite/issues/239/events","html_url":"https://github.com/aspnet/Microsoft.Data.Sqlite/issues/239","id":142289375,"number":239,"title":"Error reusing Sqlite Parameters","user":{"login":"Grauenwolf","id":10627661,"avatar_url":"https://avatars.githubusercontent.com/u/10627661?v=3","gravatar_id":"","url":"https://api.github.com/users/Grauenwolf","html_url":"https://github.com/Grauenwolf","followers_url":"https://api.github.com/users/Grauenwolf/followers","following_url":"https://api.github.com/users/Grauenwolf/following{/other_user}","gists_url":"https://api.github.com/users/Grauenwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/Grauenwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Grauenwolf/subscriptions","organizations_url":"https://api.github.com/users/Grauenwolf/orgs","repos_url":"https://api.github.com/users/Grauenwolf/repos","events_url":"https://api.github.com/users/Grauenwolf/events{/privacy}","received_events_url":"https://api.github.com/users/Grauenwolf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-21T08:57:29Z","updated_at":"2016-03-21T08:57:29Z","closed_at":null,"body":"When I send in a single command with multiple statements, it seems to have trouble reusing the parameters across all of the statements.\r\n\r\nError message: \r\nSystem.InvalidOperationException: Must add values for the following parameters: @FirstName, @MiddleName, @LastName, @Title, @ManagerKey, @EmployeeKey\r\n\r\nCommand text: \r\n\r\nUPDATE Employee SET [FirstName] = @FirstName, [MiddleName] = @MiddleName, [LastName] = @LastName, [Title] = @Title, [ManagerKey] = @ManagerKey WHERE [EmployeeKey] = @EmployeeKey;\r\nINSERT OR IGNORE INTO Employee ([EmployeeKey], [FirstName], [MiddleName], [LastName], [Title], [ManagerKey], [UpdatedDate]) VALUES (@EmployeeKey, @FirstName, @MiddleName, @LastName, @Title, @ManagerKey, @UpdatedDate); \r\n SELECT [EmployeeKey], [FirstName], [MiddleName], [LastName], [Title], [ManagerKey], [CreatedDate], [UpdatedDate] FROM Employee WHERE EmployeeKey = CASE WHEN @EmployeeKey IS NULL OR @EmployeeKey = 0 THEN last_insert_rowid() ELSE @EmployeeKey END;\r\n\r\nParameters:\r\n    @EmployeeKey: <NULL>\r\n    @FirstName: Tom\r\n    @MiddleName: <NULL>\r\n    @LastName: Jones\r\n    @Title: President\r\n    @ManagerKey: <NULL>\r\n    @EmployeeKey: <NULL>\r\n    @FirstName: Tom\r\n    @MiddleName: <NULL>\r\n    @LastName: Jones\r\n    @Title: President\r\n    @ManagerKey: <NULL>\r\n    @UpdatedDate: <NULL>\r\n\r\n***\r\n\r\nThis test passes when using System.Data.SQLite. "}}