I received the above error message from a client and at first glance, the paths are correct.

The correct path is: O:\NetTrax\02 – ProductionReports – Production

But, look at the 2nd hyphen (Reports Production), that’s not a hyphen, that is a dash.

Note: I was emailed the paths and Outlook converted the hyphen to a dash.

What’s the difference?

https://www.ascii-code.com/

It’s a completely different character and rightly so, the path is incorrect.

Here is the script I wrote to update the path and the @value I copied from email:

DECLARE @value VARCHAR(255)
DECLARE @key VARCHAR(25)

--REPORTPATH 
SET @value = 'O:\NetTrax\02 - ProductionReports – Production'
SET @key = 'REPORTPATH'

UPDATE tbl_Settings
SET DefaultValue = @value
WHERE SettingKey = @key

UPDATE tbl_UserSettings
SET SettingValue = @value
WHERE SettingKey = @key

UPDATE tbl_ApplicationSettings
SET SettingValue = @value
WHERE SettingKey = @key

 

Looking at this text in a HEX editor you can see the difference:

Notice that the first is a hyphen (HEX:2d), however, the second is (HEX:96) a dash.

After changing the dash to a hyphen…

Both are now HEX: 2d (hyphen).

Related Posts

%d bloggers like this: