SQL Replacement issue - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

kettch
Posts: 28
Joined: Wed Dec 03, 2008 9:34 pm

SQL Replacement issue

I've got an issue with a SQL script where I'm trying to run a replacement via AI (version 8.0.2). The string in my "Find What" box is never replaced with the "Replace With" value.

Currently, I am using the following values:

Find What: [mydatabasenamehere]
Replace With: [\[][DATABASE_PROP][\]]

[DATABASE_PROP] is a custom property we've added and is used in several places in the installer very successfully. We want to add "[" and "]" characters before and after the value in this property when substituting into the SQL script. I've tried escaping and not escaping the "[" and "]" as in the example above (on both FindWhat and ReplaceWith fields just to try and get it working) to no avail. I looked for any hints in the manual as to what I might be doing wrong but didn't encounter anything that helped.

What am I doing wrong?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: SQL Replacement issue

Hello,

You can try to do the replace like this:
Find What: mydatabasenamehere
Replace With: [DATABASE_PROP]
and add the "[" and "]" characters directly from your script.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”