Forum Discussion

contacteswart's avatar
contacteswart
Occasional Contributor
6 years ago

I need to run a SQL update command once keyword test completes its run. I have DB connected to TC

Hello Coomunity,

I have a keyword test which runs for a product purchase. Before continuing with another run I need to run an Update SQL query to ensure the product is deleted from users purchase list. How can I do that.

I mean I want to insert this at the end of script run so that Product is deleted automatically every time when script runs.

Thanks in advance for your help

Eswara V

18 Replies

    • contacteswart's avatar
      contacteswart
      Occasional Contributor

      Hello 

      Thanks for your reply. 

      I went through the first link given by you. Not sure where to include my query which is to be executed?

      Also 

      Went through the script extension given in your signature. I am unable to compile that code after updating it for my requirement. I use Oracle SQL Developer to run my query. Details look like this 

      SQL Type: MSDASQL.1

      Database Name: ENTUAT_SRV

      Server Name: UAT4

       

      While updating above details and executing the script I am getting the following error 

      Statement is not valid in a namespace.

      Thanks in advance for your time and help. 

      Now lot of automation I have done in Keyword driven. Now I can not revert back my changes to Scripting 

      At this point in time I am planning to include it as a Run Script at the place where I want this script to be executed 

       

      Thanks 

      Eswara V 

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        The first link is simply a starting point, describing the ADO objects available in TestComplete and giving a quick overview on how to use them for writing a query.  Basically, what is in that link is what I used to build the script extension.

         

        As for the script extension... what do you mean by "unable to compile that code after updating it for my requirement"?  What did you change?  How did you "compile" it?  The extension is provided as-is so, any alterations you made to it I cannot support directly but I'd be happy to help you figure things out.