Page 1 of 1

Use Variable for Connection String

Posted: Wed Mar 22, 2023 5:16 pm
by asawyer13
I connect to a mysql database quite often in my scripts.

Is there a way to set a global variable with the connection string and use that when I connect to my database server?

That would help a lot as I have to change my password every 90 days. I would only need to change in one place if it could be a variable.

thanks
Alan

Re: Use Variable for Connection String

Posted: Wed Mar 22, 2023 8:32 pm
by Oleg
Use menu Options->Variables and open "Global user variables" tab
Then you can use this variable in your tasks

Re: Use Variable for Connection String

Posted: Wed Mar 22, 2023 9:46 pm
by asawyer13
I set the variable up, however in the DBOpen and in the dataset loop I don't appear to be able to use a variable for the Connection String.

I put {EDDDB} which is the name of the User Global Variable in the Connection String but it doesn't work when I Test it.

Alan

Re: Use Variable for Connection String

Posted: Wed Mar 22, 2023 9:48 pm
by asawyer13
I got it. I was just doing it wrong.

Thanks
Alan