Replacing text.

[expired user #7404]'s profile image [expired user #7404] posted 10 years ago in General Permalink
I inserted an sql file (ctrl-O). It contains a number of references to my original database. I wanted to replace all references of the database name with, for example, fred999. I positioned the caret at the top of the sql text and opened the search and replace text dialog. I entered the text strings correctly. All tick box options are unchecked; the radio buttons are "Forward", "Entire scope" and "Global". I clicked Replace all.

For some reason, only the first string was replaced.

Am I doing something wrong?
kalvaro's profile image kalvaro posted 10 years ago Permalink
It should work. Can you reproduce it always? Can you post a small sample?
ansgar's profile image ansgar posted 10 years ago Permalink
I think I can reproduce that. It makes no difference whether you click the "Replace" or "Replace all" button. Will check that.
[expired user #7404]'s profile image [expired user #7404] posted 10 years ago Permalink
Thank you guys. I have a sample script if you want to test it on but I'm reasonably sure anything will do. I have two screenshots which I can't upload but I can email them if you would like some visual evidence. Anyway, it seems it has been mostly confirmed so I'll wait for your feedback.
Code modification/commit from ansgar.becker, 10 years ago, revision 8.1.0.4645
Fix non-working "Replace all" button, due to its wrong ModalResult property (mrClose). See http://www.heidisql.com/forum.php?t=14064
ansgar's profile image ansgar posted 10 years ago Permalink
Fixed in r4654.

Looks like that was never working before, since I have created that dialog in February 2010. Odd...
[expired user #7404]'s profile image [expired user #7404] posted 10 years ago Permalink
Installed 4645. Search and replace works okay now.
[expired user #7404]'s profile image [expired user #7404] posted 10 years ago Permalink
Sorry, I meant 4654.

Please login to leave a reply, or register at first.