Execute Several Queries at once in one connection
I would like to Execute serveral queries at once and don't know how to do it
my code is like this:
var AConnection, Driver;
AConnection = ADO.CreateADOConnection();
AConnection.ConnectionString = "Provider=MSDAORA.1;Password=xHl4C06T;User ID=chapar941_Auto;Data Source=srv28;Persist Security Info=True";
AConnection.LoginPrompt = false;
AConnection.Open();
var Driver = DDT.ExcelDriver("C:\\Add-EventTypes.xls", "Sheet1");
var k = aqConvert.VarToStr(Driver.Value(0));
var str = "delete from template where template.et_id in(select id from eventtype where name like '"+k+"');delete from predefined_template where predefined_template.et_id in(select id from eventtype where name like '"+k+"');delete from eventtype where name like '"+k+"'";
// AConnection.Execute(str,1,128);
DDT.CloseDriver(Driver.Name);
AConnection.Close();
I solved it we can use "AConnection.Execute_(str);" after each query
we should not concat queries and convert them into one string
we should execute each query lonely