Hanila
2 days agoOccasional Contributor
How to pass in a parameter to DB connection string
var Qry = ADO.CreateADOCommand()
Qry.ConnectionString = "Provider=PROVIDERDB;Data Source=SOURCEADDRESS;Initial Catalog=MYDBNAME;User ID=USERID;Password="+ProjectSuite.Variables.sqlReadOnlyPWDINT+";";
Qry.CommandText = Query;
Qry.commandType = cmdText;
var RecordSet = Qry.Execute();
return RecordSet;
This structure is not working for me . I am not able to get the sqlReadOnlyPWDINT passed down to connection string unless its stored as string instead of password.
Either I need to hardcode it in my script or store it as variable of SRTING type for this connection string to work. Neither of them will satisfy my risk team. Any solution to this problem?