Text column size limit

  • Hi,

    I am trying to update a text colum in my SQL server database table from my perl script. The data is just a long string of ID's with a "," as a delimiter. I can see the complete list from my Perl script (I am using Win32 :: ODBC to connect to SQL Server), but after updating the table when I go to the query analyzer to view the newly updated field, it is trucated after certain length .

    The lenght of the actual string list is just 402 characters and the list is being truncated at 256 character.

    all the help will be greatly appreciated,

    thanks in advance,

    Vijju2k

  • In QA goto Query/Current Connection Options Advanced Tab and change 'Maximum characters per column' the default is 256.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Thank you David, that did the trick. But just out of newbie curiosity, why would SQL restrict the default size to 256 char. only?? Any security problems??

    thanks,

    Vijju2k

  • It is not a security issue, or the default size for the datatype, it is just that with longer text your display output will wrap in the results window. Often when outputting data as xml I change this value to its max value(a little over 8K).

    Tim C.

    //Will write code for food

    One Windows to rule them all, One Windows to find them,

    One Windows to bring them all and in the darkness bind them

    In the Land of Microsoft where the Shadows lie.


    Tim C //Will code for food

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply