Hi everyone,
Can anyone help me please.
My requirement is to make connection string as dynamic with input parameters as I need to loop it
May I know please know how can I achieve it.
Thanks in advance
Hi everyone,
Can anyone help me please.
My requirement is to make connection string as dynamic with input parameters as I need to loop it
May I know please know how can I achieve it.
Thanks in advance
Hi @saritha
you can create tags in your connection string like this
Dsn={0};pwd={1};uid={2}
Then replace those tags with your variables in studio like this
Connection.Replace("{0}", DBDsn).Replace("{1}", DBUsername).Replace("{2}", New System.Net.NetworkCredential(String.Empty, DBPassword).Password)
the last replace is because you can get the credentials from an asset and maybe it could be as secure string, if not then you can just pass the string variable and lastly pass the new connection string to the connection property in the Connect to database activity
you cana lso get the provider name in a dynamic variable, it depends on your requirement
hope this helps
Regards
@saritha
try my module, input parameters e.g server/sid/username etc… and it will output the db connection variable
Try Connect DB - Copy (1).xaml (12.1 KB)
thanks and will try it.
Hi , Thanks and will try it.