Forum Discussion
I've actually moved away from using DB Tables because they were very 'static' in nature. I use regular Table type variables because I can add/remove columns from them on the fly. Is that the sort of functionality you're aiming for?
I actually am using table variables. Maybe I'm not using them in the correct way. I've attached pictures of my test case and circled the area I am have complications with. What I want to do is to reference back to my original variable by bknCaseID and gather the changed values from the database so I can confirm we are saving our data correctly. There are additional expectations as well that should occur in the database that I need to check. But I have been unable to find that 'work around' that was mentioned in the documentation from SmartBear.
.
- tristaanogre8 years agoEsteemed Contributor
The documentation you referenced is for DB Table variable types. This is different than a Table variable type. The former retrieves data, via an SQL query, to the variable and updates the information. The latter is a variable that you can add/remove rows and columns from and is not dependant upon a database connection.
- srandall8 years agoContributor
So in the example I provided, what I want to do is create another query, but I want that query to reference back to my initial Variable's value; thus I am querying on the same data record I changed the data on.
How do I create my query and set my where clause to get the bknCaseID I just changed information on (thus: the bknCaseID from the initial variable I created that gave me an record in a certain condition). I now need to check the results of changing that data on that same record. How do I reference my where clause to ensure I get that same record back in my results?
- andrewa8 years agoContributor
Sounds like you might want a second DB Table variable to hold the updated values so you can compare the two.
I'm not sure how TestComplete actually goes about populating the variables, or if you can put in a 'dynamic' query of sorts into the second one. There might be a way, but I haven't worked much with DB Table variables.
Related Content
- 5 years agoOAn
- 2 months agoKrishnan79
- 2 years agopstachelek