Forum Discussion

mrezahoseini's avatar
mrezahoseini
Contributor
10 years ago

send parameters in Delete Query

Hello   Thank you in advance for your kind assistance   I have a problem in Delete Query, when I 'm gonna use varaiable in Delete Query instead of hard code, like this code, what shall I do??   ...
  • mrezahoseini's avatar
    mrezahoseini
    10 years ago

    yes, my problem was solved like this :

     

     

     

    function Delete()

    {
    var AConnection, Driver;
    AConnection = ADO.CreateADOConnection();
    AConnection.ConnectionString = "Provider=MSDAORA.1;Password=autocm931;User ID=autocm931;Data Source=srv28;Persist Security Info=True";
    AConnection.LoginPrompt = false;
    AConnection.Open();
    var Driver = DDT.ExcelDriver("C:\\Add-Exchange.xls", "Sheet1");
    var k = aqConvert.VarToStr(Driver.Value(0));
    var str = "delete from exchange ex where ex.name like '"+k+"'"
    AConnection.Execute_(str);
    DDT.CloseDriver(Driver.Name);
    AConnection.Close();

    }

     

     

    Thanks for ur consideration