Use Variable for Connection String

Discuss RoboTask here
Post Reply
asawyer13
Posts: 11
Joined: Mon Jul 04, 2022 7:20 am

Use Variable for Connection String

Post 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
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Use Variable for Connection String

Post by Oleg »

Use menu Options->Variables and open "Global user variables" tab
Then you can use this variable in your tasks
Oleg Yershov
asawyer13
Posts: 11
Joined: Mon Jul 04, 2022 7:20 am

Re: Use Variable for Connection String

Post 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
asawyer13
Posts: 11
Joined: Mon Jul 04, 2022 7:20 am

Re: Use Variable for Connection String

Post by asawyer13 »

I got it. I was just doing it wrong.

Thanks
Alan
Post Reply