GetProductImage(productid : Code[10];VAR data : BigText) IF NOT (productid = '') THEN IF (item.GET(productid) AND (item."Picture Name" <> '')) THEN BEGIN //Get default settings RecSalesSetup.GET; RecSalesSetup.TESTFIELD("Path Item Pictures-WEB"); test := USERID; IF test = '' THEN ERROR('Ghost user!'); // LocTxtPicture := '\\server07\c$\75000 (Custom).jpg'; //Joy, local // LocTxtPicture := 'c:\75000 (Custom).jpg'; //joy, local // LocTxtPicture := RecSalesSetup."Path Item Pictures-WEB" + item."Picture Name" + '.jpg'; //No joy LocTxtPicture := '\\server04\data\itemadministration\Web\75000 (Custom).jpg'; //No joy // LocTxtPicture := '\\172.19.1.203\data\itemadministration\Web\75000 (Custom).jpg'; //No joy // LocTxtPicture := '\\172.19.1.203\data\itemadministration\75000 (Custom).jpg'; //No joy // LocTxtPicture := '\\172.19.1.203\data\75000 (Custom).jpg'; //No joy FileHelper2 := FileHelper2.FileInfo(LocTxtPicture); //'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.FileInfo FileMode := 4; FileHelper.Open(LocTxtPicture, FileMode); //'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.File IF (FileHelper.ToString()) <> '' THEN //FileHelper2.Exists THEN //FileHelper.Exists(LocTxtPicture) THEN//AND FileHelper2.Exists THEN BEGIN picture.CREATEINSTREAM(IStream); picture.OPEN(LocTxtPicture); IF picture.LEN > 0 THEN picture.CREATEINSTREAM(IStream); MemoryStream := MemoryStream.MemoryStream(); COPYSTREAM(MemoryStream, IStream); Bytes := MemoryStream.GetBuffer(); data.ADDTEXT(Convert.ToBase64String(Bytes)); picture.CLOSE; END ELSE ERROR('File Not Found'); END ELSE ERROR('No File') ELSE ERROR('No ID');