Hello there. Our solution is currently split between some users using a code module and some users using SQL data connectors.
The code module basically queries the database with a basic query, such as "select fullname from table1 where uniqueid = xyz" to return 1x user and validates a result before moving on to the next step.
The SQL data connector will do something along the lines of "select fullname from table1 where firstname like %a%" which will return multiple results and then pass each one in to the test suite as a new item to iteratively evaluate against.
If it possible to have the iterative functionality of an SQL data connector using each item as a variable, in the form of a SQL code module instead?
SQL Class as Datasource (Instead of SQL Connector)
Re: SQL Class as Datasource (Instead of SQL Connector)
Is this possible at all?
Re: SQL Class as Datasource (Instead of SQL Connector)
Does anyone at Ranorex read these forums?
Re: SQL Class as Datasource (Instead of SQL Connector)
Hi,
Yes, Ranorex folks read and answer this forum, but some posts sometime slip from their radars
Your best chance, and preferred way of communication, is their support form, available here:
https://www.ranorex.com/support-query/
Yes, Ranorex folks read and answer this forum, but some posts sometime slip from their radars

https://www.ranorex.com/support-query/
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: SQL Class as Datasource (Instead of SQL Connector)
Based on what you are trying to achieve, I believe it would be much easier to just adjust the existing data connector on the current test container via API rather than try to manage the entire test suite via your code. Here is a small code example of adjusting your query during runtime:
I have also included a link to the Ranorex API below:
hope this helps
Code: Select all
DataCache dc = DataSources.Get(dataSource);
((SqlDataConnector) dc.Connector).Query = newQueryString;
dc.Load();
- Ranorex API - DataSources Class: https://www.ranorex.com/Documentation/R ... ources.htm
- Ranorex API - DataCache Class: https://www.ranorex.com/Documentation/R ... aCache.htm
hope this helps