QAArvato
10 years agoNew Contributor
How to address properties in MySQL query
Hi there,
I hope someone could help, I have the following scenario:
I am using DataSource "Data Connection" to connect to our database.
I have a global property on TestSuite level named "propEntityID" w/ value 20 for example.
Now I have the following SQL select statement:
SELECT * FROM databasetable WHERE entity_id = ${#TestSuite#propEntityID}
When I run this I get a Soap error: "Can't get the Connection for specified properties; com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '$' in 'where clause'" as well as a Java Error "Unexpected token "{" at line 3, pos 50".
How do I correctly address the TestSuite property and how do I mask/escape the special characters such as "$" and "{" respectively?
Help appreciated.
Kind regards