Greetings. I have a question regarding Z SQL Methods and their connector.<br>
I need to be able to change their connector dynamically, using a python
script, which will select the connector depending on the parameters
passed to the script. I'll give you an example:<br>
<br>
Suppose I have three connectors, each one of them pointing to different databases (they all have the same tables and fields).<br>
I also have one Z SQL Method that does &quot;Select * from table&quot;. When I
create such method, I provide a connector using the dropdown list
(that'll be the connector by default).<br>
I need to create a script, called selectConnector.py, which receives an
integer parameter (n). If n equals 1, the first connector will be
chosen for the Z SQL Method; if n equals 2, the second one will be
chosen, and so on...<br>
<br>
I've tried accesing the connection_id property from the Z SQL Method. I can read it to a variable doing the following:<br>
<br>
&nbsp;&nbsp;&nbsp; conn = context.zSQLMethod.connection_id<br>
<br>
That way, I'll have a variable conn containing the connector id. What I need to do is change that connector. If I code<br>
<br>
&nbsp;&nbsp;&nbsp; context.zSQLMethod.connection_id = &lt;inserts name of new connector here&gt;<br>
<br>
I get a TypeError: attribute-less object (assign or del).<br>
<br>
Please, give me a hand, and tell me a way to modify that property from a script.<br>
<br>
Thank you very much in advance.<br>