Marsha_R
10 years agoChampion Level 3
Solved
how to make the connection path for a DBTable generic
When we give the DBTable a hard coded path, the connection works fine, but when we try to use system variables, somehow the project path ends up in there and then the connection fails. See attached screenshots. (I realize the document name is missing from the path in the second screenshot but the connection fails the same way regardless.)
We'd like to make this connection path more generic - any suggestions?
We'd like to make this connection path more generic - any suggestions?
- Hi Marsha,
TestComplete accepts only the string in this field. Thus, it doesn't parse the environment variable you specified correctly.
You can update the connection string from script as it's specified here or set it via the DBTable.ConnectionString property.
BTW, we have a suggestion to improve the Connection field in the DBTable element so that it accepts variables. I've increased its rating based on your questions.