Forum Discussion

WillClarke's avatar
WillClarke
Occasional Contributor
7 years ago
Solved

Is there a way to update a single record in SQL by based on passing in a variable from the test case

For example, before my test, I need to disable an account so that I can test to make sure I cannot login with that username / password. I would need to run SQL like the below.   update useraccounts...
  • tristaanogre's avatar
    7 years ago

    SQL Queries can be run using the ADO objects built in to TestComplete specifically the CreateADOQuery method.  Follow the link and it will give you some examples of what to do.

     

    If you want something a bit more built in, I have a script extension I wrote that puts some wrappers around it.  You can down load it here . If you need help implementing that extension, let me know via PM.