I have tried to give multiple insert or update in single query like
OleDbCommand command = new OleDbCommand("INSERT INTO Employee (Id, Name, Address, Salary) VALUES (2001, 'name1', 'address1', 100000);UPDATE Employee SET Salary = 2000000 WHERE Id = 2001;");
This executes successfully.
But I don't want multiple sql queries in single execution. Is there anything like any property or something like that in C# which can be used to restrict to only one query.
I want to restrict it to single sql query in single execution.
Thanks.
Try something like this
Create a stringbuilder of values
Then insert to sql
Update also works like same as insert
Ref