SQL update of the emPath profile photo URL


Request: A client asked the following:

First, within 6.3 we did not put the images within the src\iis path.  They were stored in a badge folder directly on the c drive.  The URL path on the profile page was \\xxxxx\employeebadges\photograph\P123456789/.jpg (this is within 6.3).  Within 6.4 I have moved the pictures to a new folder, again directly on the c drive.

What is the best practice, to store them directly within the 6.4 (C:\Nsl64\emPath\iis\Images\Employees) or on the outside on the c: drive?

Secondly my dilemma is that the URL path will need to be updated (re-linked) for each employee.  That is the manual process that we are trying to avoid.

Solution:

Personally I think the best approach, for storing the photos, will be to store them on the database once NOW provides a conversion program.  Until then I personally think you should leave the photos on the C: drive as you have done in the past.

 As for updating the URL.  I think this can be accomplished via SQL.  Assuming what you want to change is the server name I recommend you try the following.  If you want to change a different part of the URL then the same approach can be taken with some minor modifications to the SQL.

(1) verify that the StoreArtifactsInDatabase parm 1 value to "N" on the emPath 6.4 (setup > system parameter) page

(2) export the EPIC

(3) run the following SQL to see if this is the URL you are interesting in:

Select substr(EPIC_PICTURE_LOCATION,1,2) 
|| 'NEWSERVERNAME'  || substr(EPIC_PICTURE_LOCATION,9,100)
from epic;

(4) Update EPIC using a variation of SQL.  Where you replace newservername with the actual name.

update epic set epic_picture_location =  substr(EPIC_PICTURE_LOCATION,1,2) 
|| 'NEWSERVERNAME'  || substr(EPIC_PICTURE_LOCATION,9,100);