• i have a similar issue. I have really a large String (docuemnt template). I have palceholders/keys inside teh template. i have a table with key and keyValue (nvarcahr(max)). i have cursor that goes through each key and replaces it with Keyvalue. Code works fine till it hists 4000 charecters . It throws error after that .