           # PLP_TERMINATOR (no more chunks).
           buffer.writeUInt32LE(0)
       else
-        buffer.writeUInt16LE(NULL)
+        if parameter.length <= @maximumLength
+          buffer.writeUInt16LE(NULL)
+        else
+          # PLP_NULL
+          buffer.writeUInt32LE(0xFFFFFFFF)
+          buffer.writeUInt32LE(0xFFFFFFFF)
   0xAD:
     type: 'BIGBinary'
     name: 'Binary'

          # PLP_TERMINATOR (no more chunks).
          buffer.writeUInt32LE(0)
      else
        buffer.writeUInt16LE(NULL)
  0xEF:
    type: 'NCHAR'
    name: 'NChar'

          # PLP_TERMINATOR (no more chunks).
          buffer.writeUInt32LE 0
      else
        if parameter.length <= @maximumLength
          buffer.writeUInt16LE NULL
        else
          # PLP_NULL
          buffer.writeUInt32LE(0xFFFFFFFF)
          buffer.writeUInt32LE(0xFFFFFFFF)
        
  0xA7:
    type: 'BIGVARCHR'
