Ok, this sounds like an MS SQL issue, which is right. In itself it's interesting, since I use Perl to "talk" with MS SQL, and I wrote some Perl snippets to show you how: The index entry exceeds the maximum length of 900 bytes
What makes it more interesting is that while writing the entry I found a fix for the "Invalid character value for cast specification (SQL-22018)" error I got in an earlier attempt, by explicitly setting the column type using the DBI bind_param method. One day it might bite you, and hopefully you'll remember the solution.