No matching % for a variable name, wise script

Hello Experts,

I am getting the following error while compiling WISE Script "No matching % for a variable name"

The error occures at the following line and only when "%" is added

Registry Key Software\Pinpoint\Database=Password%

Can any one let me know how to solve the issue?

Thanks
Roop
rbhargawFounderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

b0lsc0ttIT ManagerCommented:
Why do you have the % character on that line?  Do you need to use it literally?  Or is it meant to be used to access a "variable"?  Please let us know what that line is suppose to do.
bol
0
rbhargawFounderAuthor Commented:
This script writes the DSN name , database name, password in the registry and our client server  picks the DSN details from registry to connect to database. Now DBA has given me a password which contains "%" in between the password string. So when I modify the password in the wise script and it gives me error
0
b0lsc0ttIT ManagerCommented:
I would ask for another password and let them know the % character won't work. ;)
Actually you can try to escape it by using Password%% .  Basically the first escapes the one that follows.  I know this works in some other uses but I don't know for sure it will in this.  It at least shouldn't cause the compiler to error it is just a matter of whether or not the % character will be in the value.
Let me know how that works or if you have a question.
bol
p.s.  The first line is said jokingly but with some seriousness.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

rbhargawFounderAuthor Commented:
Bol,

You saved me ..
"%%" worked perfectly. no compilation error occured and registry was updated with only one %
Thanks for the solution.

Roop
0
rbhargawFounderAuthor Commented:
Thanks a lot!
0
b0lsc0ttIT ManagerCommented:
Your welcome!  I'm glad I could help.  Thanks for the fun question, the grade and the points.
bol
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.