Page 1 of 1

Using/reading SqlDataConnector

Posted: Tue May 28, 2019 1:32 pm
by SanMan
Hi,

I have created an SqlDataConnector.

Can I use/access it from user code somehow?

I do not want to use it like "Data source" added to testcase.

Just want to read the data from some points while running the test.

Can I read the data with user code somehow?

Re: Using/reading SqlDataConnector

Posted: Wed May 29, 2019 5:36 am
by SanMan
https://www.ranorex.com/forum/how-to-do ... t8914.html

This is something I am looking for.

Is there somewhere in user guide or code example how to create this connection?

Can I use/utilize the data source I have already created?

"Once added to a test suite, the data source can be assigned to the test containers of this test suite."
=> With user code, I do not need to assign it and still read the data?

Re: Using/reading SqlDataConnector

Posted: Fri May 31, 2019 7:55 am
by SanMan
It was easy:

var dataConn = DataSources.Get("<connection_name>");
string one_name = dataConn.Rows[1].Values[2];

And I do not need to bind <connection_name> to test suite to use it. :)